What is the reason for this syntax?

A

Austin Ziegler

Note: this has moved far beyond Ruby. This will, therefore, be my last
post on the topic. This isn't a matter of having to have the last
word; this is a matter of not continuing a discussion that's
willfully fruitless.

Having ten dialects of the same language does not nessecarily improve
anything at all. Just as having only one thing does not nessecatily
improve anything.

Do you even know what you're talking about here, or are you just
spouting off?

In terms of human language, one doesn't get to choose the number of
dialects that exist. They are created, destroyed, and merged on a
regular basis by separation and reconnection. Sometimes, these
distinctions become large enough or varied enough that a wholly new
language is formed. Would you say that Australian English, Canadian
English, American English, and British English are all the same? I
should hope not (because to do so would be pure ignorance). Would you
say that all of these (broad) dialects should be merged into one? Say,
mid-west American English? Or maybe we should all be talking like Eton
graduates? Or shall we put the dialects on the barbie, mate! Each of
these dialects of English -- and they are very broad dialects, because I
guarantee you that a Nova Scotian or a Newfoundlander doesn't sound like
a Torontonian or an Albertan -- serves multiple purposes and exist
despite (or in spite of!) the presence of modern communications.

In terms of computer languages, few programming languages are truly
dialects of one another. Sure, one could say that C++ is a dialect of C,
but that's an uninformed and limiting view. C, C++, Java, and C# are all
closely related, but they all bring different things to the table.

* C is a low-level assembly.
* C++ adds objects, and later added templates with which can be
accomplished some truly amazing and scary things (generic programming
is the beginning of it; it is possible to do functional programming
with C++ templates).
* Java adds the JVM, restricts multiple inheritance, and adds a massive
library.
* C# deviates from Java, but adds some nicities of its own and has a
different underlying technology (generated into MSIL running on the
CLR). C# 3.0 will even be taking some cues from Ruby and other dynamic
languages to make it less verbose than its prior incarnations or its
kissing cousin, Java.

You can also make a close kinship argument for Pascal, Oberon, and
Modula 2, Delphi, and Ada (if you look at Ada, it looks a *lot* like
Pascal). You can clealy say that Oracle's PL/SQL is a member of the same
family, and it is in fact descended from Ada. When Wirth developed each
of the first three, he had slightly different goals in mind; when
Heljsberg developed Delphi, he needed the ability to do both component-
based and object oriented programming and extended the Pascal language
to do so. Ada was developed by committee, but is a remarkably good
language despite that, even if it is a bit like a straight-jacket at
times. PL/SQL didn't need everything that Ada gave, so Oracle developed
something that emphasized embedded SQL commands and gave faster access
to the database.

The C families and the Pascal families share almost no syntactical
similarities, however.

Then you have Lisp. The less I say about Lisp, the better, because I
don't know it. But there are dialects of Lisp because different people
had different ideas on how certain things should be represented. Once
lisp machines went away, it became rather more important to consider
Lisp differently, so that probably contributed some to the fragmentation
of Lisp, Scheme, Guile (a dialect of Scheme, IIRC), and other similar
languages. Lisp is a functional language, which means that it begat
thinking about programming that begat ML, Caml, OCaml, Haskell, and even
Oz/Mozart. Each of these is a functional programming language, but they
cause you to think about the way that you're writing the program
differently.

Then we have the scripting languages. These things are meant to be glue
that ties other programs together, but somehow many of them have grown
into significant languages on their own. Some of these differences are
evolutionary (and purposefully so): sh to ksh to bash. Some of them are
revolutionary: sed to awk to Perl. Some sidestep: csh (and tcsh),
Python, and Ruby.

In every single one of the languages that I mentioned above -- and I've
programmed in C, C++, C#, Java, PL/SQL, Ada, Pascal, Object Pascal
(Delphi), sh/ksh/bash, awk, Perl, Ruby and several more that I
haven't mentioned here -- there is a usefully different way of looking
at how one would solve a problem. There's a different *purpose* for
each. Sometimes, I use a particular language because it's the most
useful for a particular platform; sometimes it's mandated. Sometimes I
use multiple languages in a single program. I have an installation shell
script at work that is written primarily in a Bourne shell dialect
(assuming minimal capabilities) that uses various standard utilities and
even has awk and sed miniprograms inside of it. This is written in the
lowest common denominator because I don't control the installation
platforms. My build scripts, however, are written to take advantage of
bash 2.x features, because I control the build platforms. (And yes, I
want to rewrite the scripts to Ruby. I'll have to get Ruby on all of
them, first.)

My point is that what you've argued is essentially ignorant and
willfully so. You're coming in and assuming that these differences just
exist because people are too lazy to make sure that they don't exist.
No, these differences exist *for a reason* in every case. And as people
lose the need for certain things, those things will go away. You don't
see many people programming in 6502 Assembler these days, do you? (You
don't see many people programming in assembler at all these days. It
happens, but usually at a very late stage.)
It really is a balancing act for example as far as human biology is
concerned there is only about a one percent difference between any two
given people on earth. If there was too little differentiation at the
genetic level we would all suffer greater and greater genetic damage
due to inbreeding and eventually cease to exist. To call me arrogant
for pointing out that too much or too little difference (depending on
the situation) is a bad thing shows that you don't know what you are
talking about. The inability or human beings to focus on the things
that the have in common has been the source of so much greif.

Kevin, the above is so much nonsense. Yes, I know that the amount of
genetic variation among humans is a small value when you're talking
percentages. But percentages aren't useful here: IIRC, we share 50% of
our genetic code with most bacteria on Earth. Our genetic code is so
large and complex that it only takes a tiny fraction of difference to
express completely different phenotypes, for example. I call your
statement about human language or computer language arrogant and -- more
importantly -- painfully ignorant.
Furthermore as far as computers go limiting things to a set of agreed
upon standards is part of what allowed the desktop computer as we
understand it to take off. If every manufacturer used their own
standards people would not be able to easily replace parts and they
would probably end up locked into one or two vendors. (the situation
with laptops currently.) The vendor could also charge fairly high
prices since they are the only ones who produce the hardware; however
since we have an agreed upon standard for most hardware we have low
prices and the buyer is more or less in control of his or her own
machine rather than the vendors.

Twaddle -- and ultimately self-defeating if you're right. Limiting
things to standards retards growth. Not having standards retards growth.
If someone comes out with a new capability that isn't covered by a
standard, what are they to do? Wait until there is a standard? Right.
No, they put it out even without a standard. Other people put out
something that competes. Ultimately, this competition leads to something
that *can* be standardized. In the interim, though, people have been
using incompatible things which will need to be upgraded. I suggest you
look at the history of C++ to see how it went from Cfront to a proper
compiler, and how many compilers implemented different parts of an
emerging standard. This wouldn't matter, except that sometimes these
compilers are still in production. (!@#!!@#$! HP aCC.)

(Your parenthetical about laptops, by the by, is nonsense, much like the
rest of this paragraph. There *are* standards used, else you wouldn't be
able to do much with a laptop. They're just not things that are
necessarily made to be user serviceable or upgradeable. And I can extend
the power of my laptop just fine, thanks, with USB and expansion cards.
By and large, IME, by the time that you want to upgrade your laptop's
capabilities, the state of the art is so much better that you're better
off replacing it. Hell, at this point, I would be replacing my desktops
rather than upgrading them in any case. It's a mook's game, even though
there's a lot of standards-based extensibility.)
Creating a common culture or language need not suppress diversity of
culture and ways of thinking in the attempt to bridge the gaps between
people and in the case of a programming language what can be done with
the various languages.

Excuse me? You *don't* know what you're talking about here. Creating a
common culture almost *always* depends on suppression of the divergent
cultures. Read some history. You might learn something about that which
you're spouting nonsense. I suggest reading about the British
subjugation of Ireland and what it did to the Gaelic subculture. Or
maybe the American and Canadian reservations and residential schools.
(The residential school stuff is a particularly shameful part of
Canadian history.) Or why not look at various cultural behaviours which
have been outlawed in history?

France is going through this right now. In France, the wearing of
religious symbols is illegal in public schools and government jobs. As
(as near as mandatory to be indistinguishable from mandatory) outward
expressions of their religion, Sikhs wear turbans, have uncut hair
(unshorn beards), wear a special iron bracelet on their dominant hand,
and must carry a kirpan (a short blade). In France, the intersection of
the secular laws with these religious injunctions means that it is
highly unlikely that a Sikh would become a police officer or a
government worker. It's something that was created for good reason
(reducing control of the Catholic church over the French state) but has
since become a powerful tool of marginalisation against a wide variety
of groups. To be fully accepted in France, Sikhs would have to
*suppress* their religious differences. If they don't do that, they
aren't going to be fully accepted.

Monocultures require the suppression of the different. It's not a happy
circumstance, and reading a bit of history would tell you that.

-austin
 
K

Kevin Olemoh

Just because creating commonality almost always requires supression
does not mean it MUST require supression you just repeated what I
said. How does having standard hardware limit innovation of any kind
when no one is forbidden from proposing new standards? You keep
saying things without actually thinking about them. The fact that
there does not need to be an overly high degree of variation in the
genetic code of organisms on earth is totally irrelevant to the
underlying point that diversity is a double edged sword. You are just
asuming that any attempt to create commonality is by its very nature
is negative. I am telling you that under no circumstanxes is the
creation of commonality an absolute negative.

There was a dispute between Russia and China in the 17th century and
neither side spoke the same language so Latin was chosen for the
negotiations thus creating at least some commonality (things were
translated into Chineese by Jesuit missionaries.)

I'll take this back to computers for a second:
How is it a positive thing that rpm binaries for Mandriva,Suse, and
Fedora cannot be used interchangeably with each other? (With ease I'm
sure its possible to hack them to make them behave.) How is it good
to have a situation where one package or set of packages is available
for one distro but not the one you happen to be using? What good is
it to have two to three binary formats and then subdivisions therein
when it comes time for someone to generate binaries for distribution?
Installing things from source code doesn't even always work as
expected because of differences in where things are placed on various
distros and no real working method of handling things neatly across
dstributions?

Explain to me how diversity is actually helping people in this respect?
 
K

Kevin Olemoh

I would also suggest you actually read what I said about the
difference between spoken and written language, and computer language
I never said that we did actually choose how spoken and written
languages evolved; I am not entirely sure it is even possible to fully
direct the course of a language meant for human communication begin
with.
 
D

David Vallner

--------------enigEB2C806B64FF8A04B209D146
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Well, this has sidetracked beyond all repair, but here's my two cents as
a sidenote.
I'll take this back to computers for a second:
How is it a positive thing that rpm binaries for Mandriva,Suse, and
Fedora cannot be used interchangeably with each other?

They can? Been there, done that, got the t-shirt. Of course, RPMs are
packaged to require versions of dependencies that are present in a given
release of a distribution, and if an alien package requires newer
versions of its dependencies than are available, you have to get those
too. This however has nothing to do with RPMs being inherently
distribution-specific - the fact they often can't be used
interchangeably is the coincidence of software packagers not spending
effort on making their dependency requirements general enough for this
to be possible.

David Vallner


--------------enigEB2C806B64FF8A04B209D146
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFM2tty6MhrS8astoRAqnyAJ9nQlb2EcOF6qTeHKeuTKfmTXZUhgCePogj
atsSuwG6zr0BUMe2h6ziSWk=
=G+v6
-----END PGP SIGNATURE-----

--------------enigEB2C806B64FF8A04B209D146--
 
T

Tom Armitage

Explain to me how diversity is actually helping people in this respect?

So: I think it's time, given we're having a linguistic war, to discuss
the old chestnut that is the (moderately controversial) Sapir-Whorf
hypothesis:

http://en.wikipedia.org/wiki/Sapir-Whorf_hypothesis

In a nutshell: the things you do, the ways you solve problem, the
cultures that emerge, are entirely dependent on what can/cannot be
expressed within the language of that culture.

This theory is, as the page points out, not untrue, but the hypothesis
itself is disputed in varying ways. But it's an interesting way to
think, especially about programming.

When you don't have open classes like Ruby does, you don't approach a
problem involving String maniuplation by opening up String and
extending or altering its methods. There's a vast amount in Lisp that
just doesn't make sense as a solution in other languages, because of
the way Lisp handles data (as code). The functional languages make you
think in an entirely different way to the procedural ones.

My point is: diversity of language leads to diversity of culture and
diversity of thought.

It doesn't help, Kevin, that you confuse dialect and language.
Different Linux distros are more like dialects. It's frustrating they
don't work... but, remember, dialect can evolve into language in its
own right - and many dialect scholars would argue that the dialect
they specialise in essentially _is_ a language in its own right. Given
that... that's WHY Debian behaves differently to SUSE. They cater for
different ways of thinking.

Let's say it again: ways of thinking. That's what diversity of
expression is about. Rather than coming to a culture and trying to
make it "more like yours", why not embrace it for a while?

Right now, you're coming over like someone wanting to speak English
with French grammar. That's never going to work.

Of course, if you think that everyone thinking and expressing
themselves the same way is a *good* thing, then all I can say is that
you're much mistaken, as anyone who's tried to forcibly restrict use
of languages within a state.
 
M

Martin Coxall

My point is: diversity of language leads to diversity of culture and
diversity of thought.

Absolutely. Good programmers should ensure where possible that they
are coding regularly in at least two languages, and should take the
effort to learn many more.

But remember, a language that doesn't allow you to think about
programming in a new way isn't worth knowing...

Martin
 
K

Kevin Olemoh

Who said you had to force anything? Why do you assume that in all
cases having multiple dialects is beneficial whether we are talking
about operating systems or things we use to communicate with people.
Its a flase assumption in reality, there are languages that exist that
do not have a concept of "past" like there is in eg Romance languages
so it becomes almost impossible to try to express the concept in that
language.

If you have ten tribes in a given area that all speak different
languages it will be pretty hard to do business if you do not have at
least one language that is commonly spoken between a majority of the
groups involved at the very least. This of course does not mean that a
state must only have one official language (Some areas of China have
more than one official language other than the standardized one.)

Back to computers:

The situation with binary formats is just plain ridiculous and there
is no way to justify a spat between maintainers creating a situation
where repositories for the same distribution (dialect) are
incompatible with each other! (Fedora had this problem for quite some
time.) Had there already been a standard binary type for Linux as a
whole the problem would have never gotten as bad as it did with Fedora
or has with Linux in general. Its fine to have a bazillion binary
formats for all I care however Linux as a community should have one
that will just work more often than not on any Linux system. Without
such a thing the diversity serves to create a weakness in the
useability of these systems as opposed to a strength.
 
J

John Turner

Kevin said:
If you have ten tribes in a given area that all speak different
languages it will be pretty hard to do business if you do not have at
least one language that is commonly spoken between a majority of the
groups involved at the very least. This of course does not mean that a
state must only have one official language (Some areas of China have
more than one official language other than the standardized one.)

While you can express most things in most languages, some are just
better at some things than others. That is why we have the diversity.
There is no perfect computer language and I'm not sure there ever will
be one. Even if we ever get to the point where natural language can be
interpreted, some things could still be better written in German (or
French or Chinese or whatever). Personally I'm nigh on addicted to ruby
because it fits the patterns my own mind works in better than any other
computer language I've found so far.

As long as we have some translators, people who know more than one
language/culture, people who can be the bridges, it doesn't really
matter if not everyone can communicate with each other directly.
 
L

Louis J Scoras

Who said you had to force anything? Why do you assume that in all
cases having multiple dialects is beneficial whether we are talking
about operating systems or things we use to communicate with people.
Its a flase assumption in reality, there are languages that exist that
do not have a concept of "past" like there is in eg Romance languages
so it becomes almost impossible to try to express the concept in that
language.

Kevin;

Where are you going with all of this? Your arguments are unsound
because you keep using false analogies. Sure, natural languages are
superficially similar to computer languages, but what does any of this
have to do with your initial complaint? In fact, I've come under the
impression that you've even confused yourself. At first you were
complaining that Ruby shouldn't force you to do things a specific way,
yet your most recent responses indicate that you believe that all
languages should converge to the same place.

This is exactly the point that Austin was getting at. If there was
such a convergence, things would inevitably be lost in the
translation. That's not the worse part. Consider: who gets to choose
which is the correct way for a language to handle a specific feature?
Who gets to decide which idioms should be native to the language and
which should not? You? Certainly not me. And hopefully--for the sake
of all of our souls--not the Java guys. Well, I'm just kidding on the
last one--kinda.
If you have ten tribes in a given area that all speak different
languages it will be pretty hard to do business if you do not have at
least one language that is commonly spoken between a majority of the
groups involved at the very least. This of course does not mean that a
state must only have one official language (Some areas of China have
more than one official language other than the standardized one.)

Relevance? You just said that there is no need for one official language.
Back to computers:

The situation with binary formats is just plain ridiculous and there
is no way to justify a spat between maintainers creating a situation
where repositories for the same distribution (dialect) are
incompatible with each other! (Fedora had this problem for quite some
time.) Had there already been a standard binary type for Linux as a
whole the problem would have never gotten as bad as it did with Fedora
or has with Linux in general. Its fine to have a bazillion binary
formats for all I care however Linux as a community should have one
that will just work more often than not on any Linux system. Without
such a thing the diversity serves to create a weakness in the
useability of these systems as opposed to a strength.

Again, what does this have to do with anything? If you think this has
any bearing on whether the keyword should be elsif or elseif, IMHO you
have gotten yourself a little off track.
 
K

Kevin Olemoh

If you read up a few posts you will see that someone other than myself
brought up a "metalanguage" in response to someone else's comment
about the elsif keyword. (As far as I am concerned I do not think
having a specific keyword for else if is even nessecary at all but it
does not bother me. )I actually responded to this person musing that
perhaps we (as in the programming world itself not nessecarily Ruby
specifically) should form a committee not unlike what exists for html
in order to adress the issue of differences in syntax and features. I
said that there is no need for one official language to refute
Austin's postulate that having a lingua frnca requires the destruction
and or limiting of other languages in any way. I pointed out that some
areas of China have more than one official language for that purpose.

I'm only using "natural" language to point out how it could be
beneficial to work towards having a lingua franca with "manufactured"
languages.

Also note that I never meant to imply that any existing language let
alone ruby could become the lingua franca of the computer world.
 
D

David Vallner

--------------enig6A5C6F6EFC1D0B42C82AD451
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Kevin said:
Who said you had to force anything?

You did?
Why do you assume that in all
cases having multiple dialects is beneficial whether we are talking
about operating systems or things we use to communicate with people.
Its a flase assumption in reality, there are languages that exist that
do not have a concept of "past" like there is in eg Romance languages
so it becomes almost impossible to try to express the concept in that
language.

Look, this wild sidetracking only to win a virtual Being Right contest
is getting a little tiresome. You've gotten past the stage where you're
even remotely connected to reality and turned to just spewing random
unrelated anecdotes to try to support your opinion as fact. (Despite the
fact there is no logical connection between those anecdotes and your poin=
t.)

You presented your opinion, people disagreed with it, you went on to
gather flimsy "proof" to support it, most of the replies you had to that
proof were for the sake of argument rather than because anyone actually
got to doubt his opinion and lashed back out in a defensive reflex like
you keep doing.

So... Take it like an adult already and admit that your opinion is just
that, and not a religious maxim that needs fervent upholding, and just
drop it already - everything that was to be said about the topic has
already been said. (And then some.)

But since I went on and started this post:
The situation with binary formats is just plain ridiculous and there
is no way to justify a spat between maintainers creating a situation
where repositories for the same distribution (dialect) are
incompatible with each other! (Fedora had this problem for quite some
time.) Had there already been a standard binary type for Linux as a
whole the problem would have never gotten as bad as it did with Fedora
or has with Linux in general. Its fine to have a bazillion binary
formats for all I care however Linux as a community should have one
that will just work more often than not on any Linux system.

Linux has a standard binary format: ELF. Statically-linked ELF binaries
will work across distributions on the same CPU architecture just fine.
Dynamically-linked ELF binaries will work across distributions on the
same CPU architecture, provided their dependent shared libraries are
present in the required versions.

Now, I presume you have gotten your terms confused, and actually meant
package formats. Which are RPM and DEB for the most notorious ones. As I
already mentioned before, RPM and DEB packages are
distribution-agnostic, they just happen to often be incompatible across
distributions. RPMs more so than DEBs, most probably because there are
only two major Linux distributions using DEB, and Ubuntu is at its core
a debian-testing snapshot with polish, support, and marketing; the RPM
distributions are more independent, . This is anecdotal (if frequently
seen), unrelated to any inherent quality of the package formats, and any
standardisation on the front wouldn't do anything for being able to use
a FC package on SuSE. (Mind you, I have used FC RPMs on SuSE, Debian
DEBs on Ubuntu, and SuSE RPMs on Ubuntu, Successfully. Your point,
whichever it is you're trying to make by repeating the packaging system
argument again, is moot whichever way you look at it, but I can't let
that stop me, can I?)

RPM doesn't have the concept of a "repository". Neither does dpkg
(DEBs). So once again, you might be confusing terms, whether
deliberately, or out of ignorance. And unsurprisingly, you're wrong.
Again. The more prominent "repository" bits on top of RPM are YaST, yum,
and urpmi. As far as I know, they are technically independent of the
underlying package format, as long as the repository can provide the
necessary metadata for resolving dependencies. Repository metadata
formats don't map 1:1 to package formats - being completely unrelated to
each other might, or might not be why. (Guess which.) There is nothing
that says that a software installer tool has to be bound to a given
package format. Or heck, to a given repository type. To wit: apt-rpm, to
handle RPMs from an APT repository. Or smart, able to handle DEBs, RPMs,
and TGZs from 11 types of repositories.

Oh, and one more nail in the coffin. The standardisation of package
formats is barely seen because both DEB and RPM are fairly new, worse
yet for the software installation tools. Oh, and RPM is the standard
package format for distributions that follow the Linux Standard Base.

See how fun the world is when you know your facts?

I'll follow Austin's example now and stop feeding the troll, who,
doubtlessly enraged by the odd ad hominem jab, will squirm pathethically
and try to "prove" that his point, despite being dissected and
demonstrated to be wrong, is still by some circular logic valid.

David Vallner
Popcorn for the show, anyone?


--------------enig6A5C6F6EFC1D0B42C82AD451
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFM+sCy6MhrS8astoRAoXQAJ0Ri9TLubLrxt+W+br3dlT5e/aicACfX5a6
tyr2IxEBtpDrgddm3fY5bDM=
=+Xsr
-----END PGP SIGNATURE-----

--------------enig6A5C6F6EFC1D0B42C82AD451--
 
R

Rimantas Liubertas

perhaps we (as in the programming world itself not nessecarily Ruby
specifically) should form a committee not unlike what exists for html
in order to adress the issue of differences in syntax and features.
<...>

Er, which version of HTML do you have in mind? HTML2, HTM3.2, HTML4,
HTML4.01, HTML5, XHTML Basic, XHTML 1.0, XHTML 1.1 or XHTML2?

It was told more than once here: different languages exist for the reason,
just like spoon and fork exist for a reason. Should we start a committee to
unify those too?

Desire to change the world for the better is very good, but id doesn't hurt
to get to know the world before changing it...



Regards,
Rimantas
 
D

David Vallner

--------------enigEFBF79B9E221E500A44D4769
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
And hopefully--for the sake
of all of our souls--not the Java guys. Well, I'm just kidding on the
last one--kinda.
=20

<defensive-nerve-twitch>
Hey!
</defensive-nerve-twitch>

For something more non-trollish, the Java rocky way towards lambdas and
closures via anonymous inner classes (eww) just might mean that if
either CICE or BGGA get promoted into the language, you could use a
stateful command-object implementing a SAM type interchangeably with a
closure, eliminating the need for a first-class (and isolated) closure
concept. Which I can't think of what it could be good for, but then
again, noone knew what continuations were good for for a webapp until
recently either.

David Vallner


--------------enigEFBF79B9E221E500A44D4769
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFM/BBy6MhrS8astoRAtHQAJ4jXSgVND/YfsSCL+MzzsnDLqHbXwCeL5B9
Cf8d6mI5tq91pBjTHuvzEsU=
=yhyy
-----END PGP SIGNATURE-----

--------------enigEFBF79B9E221E500A44D4769--
 
D

David Vallner

--------------enig307ACC39F32FF13AE0E0B995
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Rimantas said:
Er, which version of HTML do you have in mind? HTML2, HTM3.2, HTML4,
HTML4.01, HTML5, XHTML Basic, XHTML 1.0, XHTML 1.1 or XHTML2?
=20

XHTML1.0 served as text/html, or application/xhtml+xml? *ducks*

As a side note, I think the W3C is a laughable excuse for a standards
body, what with instead of trying to reconcile differences and maintain
a stable status quo they focus instead of reams upon reams of documents
reinventing many wheels in syntax with lots of angle brackets. Some
people on it have their heads right side up, but whoever went on and
detached the XML data model from its text representation deserves being
slapped around.

David Vallner


--------------enig307ACC39F32FF13AE0E0B995
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFM/Luy6MhrS8astoRApKbAJ9Ih+/jrlrdwGmQ+dEjnn/N1tQjzgCfReo1
ExXAOQQHzwCyoh/RnkLLsn4=
=bQC9
-----END PGP SIGNATURE-----

--------------enig307ACC39F32FF13AE0E0B995--
 
K

Kevin Olemoh

If you can't understand what someone was responding to who are you to
talk about whether they understand compilers when you don't even
understand the nature of the conversation to begin with? What I did
was reply to a comment from another person that started this line of
conversation. Then some one comes along and says that there is no
issue and everyone who thinks there is are not knowledgeable enough
about anything to even think about such a situation. I disputed this,
simply put this really had nothing to do with the technical aspects of
any programming languages period, it was and is a very philosophical
thing that was brought up by someone other than myself.

When I said that I felt that the else if keyword was unnessecary what
I meant was that you should be able to do the following:

if condition
#stuff
else
if condition
#stuff
end
 
D

dblack

Hi --

When I said that I felt that the else if keyword was unnessecary what
I meant was that you should be able to do the following:

if condition
#stuff
else
if condition
#stuff
end

The problem is that you introduce the if/else ambiguity into Ruby:

if false
a
else if true
b
else
c
end

Does this result in b or c? The answer is that there's no answer: a
rule has to be decided upon (like that an else goes with the most
recent if, or the least recent if, or whatever).

Ruby doesn't have this ambiguity, because every if has an end -- and
if you want to cascade conditions, you can use elsif.


David

--
David A. Black | (e-mail address removed)
Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3]
DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4]
[1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com
[2] http://dablog.rubypal.com | [4] http://www.rubycentral.org
 
L

Louis J Scoras

For something more non-trollish, the Java rocky way towards lambdas and
closures via anonymous inner classes (eww) just might mean that if
either CICE or BGGA get promoted into the language, you could use a
stateful command-object implementing a SAM type interchangeably with a
closure, eliminating the need for a first-class (and isolated) closure
concept. Which I can't think of what it could be good for, but then
again, noone knew what continuations were good for for a webapp until
recently either.

Isn't this sort of torture governed by international law? *smirks*

On a serious note, I wonder how well closures will work out in Java.
It just seems somewhat out of place to me. Even in ruby there are
instances when blocks are a pain to work with. If you want to pass
more than one block to a method, it looses its elegant looks, IMHO:

# okay, but eh...
foo(lambda do |x|
bar
end, lambda do |y|
baz
end)

# I think the standard way is worse in this case
foo(lambda do |x|
bar
end) do |y|
baz
end

# probably the way to go
l1 = lambda {|x| bar}
l2 = lambda {|y| baz}
foo(l1,l2)

I'm not quite sure how to solve that though? Maybe this? =)

(foo (lambda (x) (bar))
(lambda (y) (baz)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top