On Thu, Mar 08, 2007 at 03:54:10PM +0900, Yukihiro M. wrote:
|Both are silly, all things considered. Both approaches are “incorrect”
|by the grammatical rules of English.
Correct or not, I chose ‘elsif’ as the shortest correct pronounceable
word for ‘else if’.
. . . and I’m perfectly happy with that choice. I’m sure I’d be happy
with the choice of “elseif”, as well, except that I’d be slightly more
likely to introduce typos since I use elsif in Perl a lot more often
than I use elseif in PHP.
In message “Re: elseif v. elsif ??”
on Thu, 8 Mar 2007 15:00:36 +0900, Chad P. [email protected]
writes:
| elseif is more correct because “else” has an E in it!
|
| elsif is more correct because it lends to correct pronunciation, while
| elseif looks like it should be pronounced “ell-safe”!
|
|Both are silly, all things considered. Both approaches are “incorrect”
|by the grammatical rules of English.
Correct or not, I chose ‘elsif’ as the shortest correct pronounceable
word for ‘else if’.
be glad Mr. M didn’t choose to make elsif in Japanese.
It’s nothing like the English. But the way Ruby methods work by being
appended to an object does work like a lot of Japanese grammatical
endings (sans the dot of course). I can’t say for sure that it has
anything to do with that choice of syntax, but it may explain why
Ruby is popular in Japan. Many structures in Japanese language are
similar to functions but the parameter list comes before the
function. Learning Japanese certainly wouldn’t hurt understanding
most programming languages.
On Thu, Mar 08, 2007 at 04:34:21PM +0900, John J. wrote:
be glad Mr. M didn’t choose to make elsif in Japanese.
It’s nothing like the English. But the way Ruby methods work by being
appended to an object does work like a lot of Japanese grammatical
endings (sans the dot of course). I can’t say for sure that it has
anything to do with that choice of syntax, but it may explain why
Ruby is popular in Japan. Many structures in Japanese language are
similar to functions but the parameter list comes before the
function. Learning Japanese certainly wouldn’t hurt understanding
most programming languages.
I suspect the early popularity of Ruby in Japan had more to do with the
fact that it started there – and the current popularity of Ruby in the
States has something to do with the fact that it finally spread far
enough to get noticed here.
In other words, its popularity in a given area probably relates to the
fact that it has finally been noticed there. It doesn’t seem to take
much to make Ruby popular. You’d have a harder time stopping it from
being popular.
That almost makes me embarrassed to be a Perl hacker on ruby-talk.
We’re not all like that. In fact, that’s a distinct rarity. So sad
that it’s in someone well known that you get to see this nonsense.
Well this is what you get if you force an already angry person to learn
a butt ugly language because some managor never heard of anything other
than ASP.Net, Java and Ruby on Rails. And decided (under these
conditions correctly) that the best option is RoR.
And no matter what you say treating newline as a statement terminator IS
plain stupid. Especially since the Ruby parser is not bright enough to
handle
foo.bar( 1 + 2
3
)
Well, at least it breaks noisily in this case.
And while this is just a syntactic issue that I will most likely end up
learning to accept, the absence of use strict and even the total
unability to specify that I DO want a new variable is something I will
hate till the Ruby community gets through the flaming discussion that
the Perl one had some eight years ago.
Let’s see … what does this code do?
for my $obj (@list) {
$obj->foo()
}
Well, that’s clear, it calls the foo() method on all objects in the @list. OTOH, what does this one do?
list.each { |obj| obj.foo() }
Well, maybe it does the exact some thing … and maybe it also changes
the obj variable from whatever it was before this line to the last
object in the list. How do you make it clear? Well, you don’t. There’s
no way to make sure variables do not leak out of blocks. Yeah, most
methods are 5 lines long so it doesn’t matter, sure :-}
Jenda
P.S.: To make it “on topic”. I don’t care whether it’s “elseif” or
“elsif”. Whatever it is, the docs should state that clearly to alert the
people comming from any of the many languages that chose the other form.
On Thu, Mar 08, 2007 at 08:49:00PM +0900, Jenda K. wrote:
Well, maybe it does the exact some thing … and maybe it also changes
the obj variable from whatever it was before this line to the last
object in the list.
FWIW, I understand this is/has changed in ruby 1.9, so that block
parameters are always local to the block.
On Thu, Mar 08, 2007 at 09:10:19PM +0900, Marc H. wrote:
“The “Ruby in 20 Minutes” tutorial is obviously geared to the
experienced programmer”
Everyone should start with the pickaxe2, really. Or Pine tutorial.
The Pickaxe has some severe shortcomings as an instructional text for
people who are not experienced programmers. It’s a great book in many
ways, but for a newbie programmer, not so much. It assumes a fair bit
of foreknowledge.
I’m glad Messrs. Thomas and Hunt didn’t decide to try to make the
Pickaxe everything to everyone. Books that result from such an attempt
tend to be notoriously bad at being anything to anyone. Pick a target
audience for your book, and stick to it – you’ll have better luck that
way. The Pickaxe is great within its niche. Just don’t make the
mistake of thinking that niche is for people who are new to programming.
We’re not all like that. In fact, that’s a distinct rarity. So sad
that it’s in someone well known that you get to see this nonsense.
Well this is what you get if you force an already angry person to learn
a butt ugly language because some managor never heard of anything other
than ASP.Net, Java and Ruby on Rails. And decided (under these
conditions correctly) that the best option is RoR.
So you’ve been tasked by your superiors to learn a new language, and
your first interaction with the people who can best help you do that is
to antagonise them?
And while this is just a syntactic issue that I will most likely end up
learning to accept, the absence of use strict and even the total
unability to specify that I DO want a new variable is something I will
hate till the Ruby community gets through the flaming discussion that
the Perl one had some eight years ago.
Please accept the simple fact that Ruby is not Perl, will not become
Perl, and does not need to be Perl. You will find that we are quite
willing to help with any problems you may have (at least, those of us
who haven’t killfiled you already), but it is exceedingly unlikely that
any complaints you make about the language itself will be taken
seriously until you have enough experience with it to understand why it
is the way it is, and to analyse it on its own merits as opposed to
measuring it against an arbitrary external yardstick.
You are not the first person to make these complaints - although I’ve
never seen them made in such a mean-spirited, arrogant manner - and you
probably won’t be the last. Somehow, in spite of the issues you’ve
identified, some of us manage to get useful, profitable work done. It
might be worth your while investigating how that’s possible.
This is all I’m going to say on the matter. I presume everyone else is
following a “don’t feed the trolls” policy - I guess I’m a little too
generous for that.
On Thu, Mar 08, 2007 at 09:35:06PM +0900, Daniel B. wrote:
Damn, it’s also the name of my top secret fork of Ruby for MS Windows.
Windows + Ruby = Wuby.
I’m dwivin’ in my car…
Hey . . . if you were really planning a “top secret fork of Ruby for MS
Windows”, I’d say Wuby would be an excellent name for the language.
One wonders, however, why you’d need to fork it for Windows.
Hey . . . if you were really planning a “top secret fork of Ruby for MS
Windows”, I’d say Wuby would be an excellent name for the language.
One wonders, however, why you’d need to fork it for Windows.
Damn, it’s also the name of my top secret fork of Ruby for MS Windows.
Windows + Ruby = Wuby.
I’m dwivin’ in my car…
Hey . . . if you were really planning a “top secret fork of Ruby for MS
Windows”, I’d say Wuby would be an excellent name for the language.
One wonders, however, why you’d need to fork it for Windows.
A Windows-only fork would have several advantages.
First, I could use the native Windows API functions for everything and
not worry about *nix compatability.
Second, I could modify the core classes as I see fit to take advantage
of the Windows API functions.
Third, I could alter the API of some of the Ruby core classes and/or
modules where it makes sense to do so on Windows (i.e. get rid of the
Unix-isms, add Windows-isms).
Fourth, I could more easily handle Unicode issues (ties back to the
first reason).
Given the reasons above, I would scrap and completely rewrite the
following core classes:
Dir
File
File::Stat
IO
Process (and related modules)
And parts of:
Kernel
Regex
String
I would also make some pretty hefty changes to the standard library,
especially Socket.
Hey . . . if you were really planning a “top secret fork of Ruby for MS
Windows”, I’d say Wuby would be an excellent name for the language.
One wonders, however, why you’d need to fork it for Windows.