Ruby User Group??
Rob Wehrli
plug-devel@lists.PLUG.phoenix.az.us
Wed Mar 20 14:02:24 2002
Carl Parrish wrote:
>
> Does anyone know of a local ruby user group? I'm still ramping up on it
> but I think I can say for sure that this is fast becomming my favorite
> language. Of course I seem to barly have time for PLUG these days so I'm
> not too sure a new UG would be wise. Hmmmm do we have an "offical" devel
> language yet? If not I would move that we choose Ruby. I agree 100% with
> all the reasons Hans felt we shouldn't use Java. And except for Python
> (and *maybe* php). I can't think of another opensource language that
> would fit our needs as well. What do you think?
>
> Carl Parrish
>
Choose Ruby? Go form a Ruby group if you want to "choose" it for
something. Don't go pushing yet another interpreted, scripted crap
language down the throats of programmers!
Like:
Instead of (Java-like) every time:
Form form = forms.first();
while (form != form.last())
{
if (form.valid())
{
// ---- Do something
}
form = form.next();
}
the Ruby way is:
class Forms < Array
def each_form
each do | form |
yield form if form.valid
end
end
end
forms.each_form do | form |
# ---- Do something
end
Has any real value! Instead of balancing braces, we're balancing ends?
What new benefit are we gaining from this "enhanced" syntax? We now
have to consider that "each" is a keyword meaning elements in an array?
I love "each do | form |" Read that as "each do pipe form pipe" or is
that supposed to be the absolute value of form? Sorry, but I still
don't see what makes Ruby so special. AND the author of the LJ article
is obviously WRONG since the code above is NOT Java-like, since Java can
not convert (class) form to a boolean to make the while conditional
true/false, though C can if "form" is really a pointer to a Form class.
Or how about writing your own book on "Why not choose an esoteric
language with practically no direct business application?" Or better
yet, let's all go play in the C# sandbox!
If we ever have an "official" development language, perhaps we should
consider that this is the PLUG (the Linux part is hidden in there
somewhere) developer's group and the language of Linux is C.
Hopefully I haven't rained on your Ruby parade too much, but jeez, let's
start adding up all of the truly "pragmatic" benefits of everyone having
ANYTHING AT ALL to do with Ruby and see just what that and a 10-10-220
call will get for us? If you want to learn and use Ruby, fine, go
ahead. Let's not nominate it for an academy award just yet. I for one
absolutely do not want anything to do with it. Anyone want to guess how
many prospective employers are looking for C programmers versus Ruby
programmers today...tomorrow...in 10 years?
I mean...take a look at the syntax. If the "class Form" is somewhere
previously declared, then why declare it here? It is being declared
FIRST here. Is "yeild" a keyword or a method? Probably a keyword,
huh? Does it mean "yeild as in giving way to something else" or does it
mean "yeild as in producing something?" "def each_form" what is that, a
method declaration? A variable declaration? Probably a method.
Apparently it interacts with/upon a "form" instance. Isn't that
quaint. A method declared internally to operate on its "outerself."
Wow...kinda like an iterator but the type is unclear? You can keep it.
class Song
def initialize(name, artist, duration)
@name = name
@artist = artist
@duration = duration
end
end
Is this Visual Basic or what?
Take Care.
Rob!