Elseif v. elsif?

Brian A. wrote:

7stud 7stud wrote:

explicitly pointed out in a beginning tutorial? So far, I have to give
Ruby two thumbs down.

C++, Java, Javascript, php, Servlets+JSP programmer

I have a similar language background (minus php). When I first looked at
Ruby, I spent a few minutes flipping through the Pickaxe, spotted what I
felt were some “Perlisms”, and made a knee jerk reaction to reject the
language. I’ve since talked to a few folks who did the same, so mine was
not an isolated incident.

It was about a year later that I came back to Ruby (because of Rails)
and discovered that I like the language (a lot). I’m sharing this
because learning from other people’s experience can be helpful. I don’t
know if you’ll end up enjoying the language as much as I have, but it
may be worthwhile to invest some more time with it before deciding. I
even realized that I actually like a few of the “Perlisms” - the horror!
:slight_smile:

Don’t worry. They’ll go away. The Wuby moto is break what works, rename
what’s commonly known and add gotchas for fun.

Jenda

On 3/7/07, 7stud 7stud [email protected] wrote:

Don’t worry. They’ll go away. The Wuby moto is break what works, rename
what’s commonly known and add gotchas for fun.
I’ve seen it mentioned a couple of times–what the heck is wuby?

Jenda, at least this version of Jenda since others seem to recognise
said person as a positive influence in the Perl world at one point, is
a troll.

There’s absolutely nothing of value in what Jenda says at this point.

-austin

Austin Z. wrote the following on 07.03.2007 19:52 :

There’s absolutely nothing of value in what Jenda says at this point.

I don’t agree. Thunderbird may be able to learn how to automatically put
trolls in my Junk folder thanks to him/her. Please continue Jenda, this
is a high trafic list, I need some material :slight_smile:

Lionel

On 3/7/07, Austin Z. [email protected] wrote:

Jenda, at least this version of Jenda since others seem to recognise
said person as a positive influence in the Perl world at one point, is
a troll.

I agree with you insofar as “this version”. I’m under the impression
that the posts are coming from someone posing as Jenda. It appears
that ruby-forum.com does send a activation email, but perhaps someone
hacked Jenda’s email account or hacked the ruby-forum.com account post
activation. I just find it hard to believe that someone who’d been so
esteemed in the Perl community would stoop to the behavior we’ve seen
on this list, nor that they would refer to “Pearl”[1] in any forum…

Jacob F.

[1] ruby-talk:242290

Don’t worry. They’ll go away. The Wuby moto is break what works, rename
what’s commonly known and add gotchas for fun.

I’ve seen it mentioned a couple of times–what the heck is wuby?

Yes, I guess you’re right. I’ve never seen ‘elsif’ or ‘elif’ before.
But couldn’t/shouldn’t that be expected? So why not point that out in
“Ruby in 20 Minutes”? There isn’t even anything about that in the
“Ruby from C and C++” page either, although instead of burying it in
there, I suggest it be deployed to the front lines.

I guess it will take a huge effort to document everything that may
be unfamiliar to one or another person coming from different background.
And “Ruby in 20 Minutes” will spend several hours just for those
differences :slight_smile:

Regards,
Rimantas

On 3/7/07, Jacob F. [email protected] wrote:

activation. I just find it hard to believe that someone who’d been so
esteemed in the Perl community would stoop to the behavior we’ve seen
on this list, nor that they would refer to “Pearl”[1] in any forum…
now that might be a stupid - although unlike - typo.
the behavior is strange though if the info concerning the person is
correct maybe I should search the archives.
Or maybe my first idea to contact CPAN is a good one too, imagine the
poor guy if his address is spoofed…

What’d you think?

Robert

Robert D. wrote:

hacked Jenda’s email account or hacked the ruby-forum.com account post
activation. I just find it hard to believe that someone who’d been so
esteemed in the Perl community would stoop to the behavior we’ve seen
on this list, nor that they would refer to “Pearl”[1] in any forum…
now that might be a stupid - although unlike - typo.
the behavior is strange though if the info concerning the person is
correct maybe I should search the archives.
Or maybe my first idea to contact CPAN is a good one too, imagine the
poor guy if his address is spoofed…

What’d you think?

Observe:

http://66.102.9.104/search?q=cache:xXEIdNOg_48J:www.perlmonks.org/%3Fnode_id%3D81566+jenda+ruby&hl=en&ct=clnk&cd=3&gl=uk&client=firefox-a

Not definitive, but certainly interesting. Also:

http://66.102.9.104/search?q=cache:95o0skP5sNAJ:www.perlmonks.org/%3Fnode_id%3D92976+jenda+ruby&hl=en&ct=clnk&cd=4&gl=uk&client=firefox-a

7stud 7stud [email protected] writes:

Thanks for all the help. It looks like way up at the top, Robert D.
first identified the problem, but I didn’t see how it applied.

As a newcomer, I would suggest someone redo the tutorial “Ruby in 20
Minutes”: add in ‘then’ and include a statement about ‘elsif v. elseif’.
I still think leaving the ‘e’ out is a ridiculous construct.

It may seem like a ridiculous construct to you, but for lots of people
who have programmed in other languages, “elsif” is not unusual. That
spelling has been in use for some 40 years in other languages that many
people are familiar with.

Since ruby has been around for more than 14 years and has probably
thousands of people writing programs in it and probably millions of
lines of code, I wouldn’t hold my breath waiting for anyone to change
the spelling of “elsif”, because that would break a lot of existing
software … irrespective of how ridiculous that spelling might seem to
you and other people.

“Robert D.” [email protected] writes:

So why would “else if” be better?

You’re all wrong. The best is indisputably this:

si … , entonces

si no y si … , entonces

si no y si … , entonces

si no,

el fin

:slight_smile: <== obligatory irony indicator

On 3/7/07, Alex Y. [email protected] wrote:

that ruby-forum.com does send a activation email, but perhaps someone
What’d you think?
Alex

Oh boy I am a bad detective, I was about to innocent the guy.
You know I have not found a single reference to jenda cpan
org he always uses is original address. Jan Krynický (JENDA) - metacpan.org
He always signed his mails with a quote most of the time the same
from Terry Pratchett.
But I guess he just fell on his head, poor guy…

This does not concern me anymore.

Thx Alex I am grateful, was about to make a complete fool out of myself
:frowning:

Cheers
Robert

On 08/03/07 Andrew Koenig said:

Different?

Algol 68 spelled it that way in 1967, a spelling that the Bourne Shell
adopted in Unix in 1977.

Not to mention that Ruby builds on Perl, which uses elsif.

Mike

Remember in those days, heck even in the 80’s languages and tools
(programs) used the shortest names possible because computing power
and memory were at a premium so even saving one character made a
difference. Thus we get all these sick little names for Unix tools,
love them or hate them.

On Wed, Mar 07, 2007 at 10:19:23PM +0900, Robert D. wrote:

LOOK AT THE ELSIF SYNTAX CAREFULLY–IT’S ‘ELSIF’ NOT ‘ELSEIF’
a spanish music magazin explained that such discussions are futile and
nobody can judge at that level. This explaination took a whole article
just in concluding that Carreras was better than both…

So why would “else if” be better?

It’s grammatically correct.

That was my point – if you want to complain about one approach being
“more wrong” than another, the only one of the four that has any real
claim to correctness the others do not is the two-word version, because
it at least is grammatically correct English.

Of course, I don’t much care. I’m perfectly willing to use elseif,
elsif, or elif, depending on the language. They all work. Bully for
them.

My point is not that everyone should start using “else if”, but that
complaining that “elsif” is somehow “wronger” than “elseif” is silly.
You could as easily construct an argument the other way around. Watch
this:

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.

Of course, in Ruby and Perl “elsif” is grammatically correct, and in VB
“elseif” is grammatically correct, while in Python and bash “elif” is
grammatically correct. These are not English. They’re bash, Perl,
Python, Ruby, and Visual Basic, respectively. So, really, none of them
are incorrect.

Someone remind me, by the way, what non-MS languages use “elseif”. I
know there are others, but I’m drawing a blank. Surely there must be
some language outside of Microsoft’s miniature little ecosystem that use
elseif.

Oh, I just remembered PHP. Well, there you go. VB and PHP. Now all
three versions have two languages associated with them in this email.

I wonder if it’s indicative of something fundamental that the two
languages out of the six that I’d be least likely to choose for serious,
large-scale development are the two languages that came to mind for
“elseif” examples. It’s probably only indicative of my taste, I guess.

On Thu, Mar 08, 2007 at 08:35:09AM +0900, Lloyd Z. wrote:

nobody can judge at that level. This explaination took a whole article
si no y si … , entonces

si no,

el fin

Maybe we should start using Japanese, particularly for Ruby.
Unfortunately, while I know enough nihongo to say “yes” and “no”, I
don’t know enough for “if” and “else”.

On Thu, Mar 08, 2007 at 12:28:10AM +0900, John J. wrote:

computer language should be more like a human language, but that too
is a bad idea. Human language is very implicit, contextual, and
fuzzy. When you are really dealing with 1s and 0s you can’t be so fuzzy.

I mostly agree – except that complaints about syntax and the like that,
if addressed, would provide some measurable benefit for programmers
without notable detriment are certainly worth discussion. I just don’t
think “elseif” vs. “elsif” meets such criteria for dicussion.

On Wed, Mar 07, 2007 at 11:35:41PM +0900, Martin DeMello wrote:

and

z = if x < y
-1
elsif x == y
0
elsif x < y
1
end

Whitespace isn’t significant. No need to make it ugly like that.

. . . though I understand your point – that it’s logically nested.
Then again, that’s kinda what’s happening anyway – you’re nesting “if”
inside “else”. The use if elsif is just a linguistic convention that
some people find more helpful for understanding what’s going on.

I suspect (though I don’t know for sure, since I’ve never fully specced
out a language and implemented it) that using “else if” would even be
easier for the implementation, since there’s one fewer keyword involved.
You’d just have to be sure to allow a “hidden” end keyword effect when
another else appears without an explicit end keyword.

On Thu, Mar 08, 2007 at 04:20:27AM +0900, Lionel B. wrote:

Austin Z. wrote the following on 07.03.2007 19:52 :

There’s absolutely nothing of value in what Jenda says at this point.

I don’t agree. Thunderbird may be able to learn how to automatically put
trolls in my Junk folder thanks to him/her. Please continue Jenda, this
is a high trafic list, I need some material :slight_smile:

Ahh, the silver lining.

On Thu, Mar 08, 2007 at 03:50:17AM +0900, 7stud 7stud wrote:

Don’t worry. They’ll go away. The Wuby moto is break what works, rename
what’s commonly known and add gotchas for fun.

I’ve seen it mentioned a couple of times–what the heck is wuby?

It’s a sarcastic, trollish way of saying “Ruby” if you’re trying to
convey a sense that it is childish. The only person I’ve ever seen use
that spelling is “Jenda”, and it’s already getting old. If you’re going
to choose to avoid Ruby, please don’t do so because of what a troll
said.

On Thu, Mar 08, 2007 at 02:15:07AM +0900, Andrew Koenig wrote:

“Chad P.” [email protected] wrote in message
news:[email protected]

“Different” would be more like the way bash does it: “elif”

Different?

Algol 68 spelled it that way in 1967, a spelling that the Bourne Shell
adopted in Unix in 1977.

I was being slightly facetious. I really don’t see anything
particularly wrong with any of these variations that have been discussed
here.