A crosspost from the Perl Community

T

Todd Benson

Todd Benson wrote:
I suggest to drop the idea. A beauty contest in this area is just a
flamewar-sure-to-happen. And it's completely pointless, you can't
convince anyone something (or someone) is more beautiful (or clean). And
there's penty of both Perl and Ruby examples all around the Internet so
there is no point to add yet another bunch.

I'm just going to have to agree with you again. I'm torn, you see. I
see elegance in Ruby, but at the same time get a little frustrated
with its flexibility; a taste of scariness even. I'll continue to
favor the language over some popular other ones, because, for me, I
can read the code easier, even if the same thing is done several
different ways.

I should point out as a side note that I still haven't bought into the
whole "pragmatic" thing, simply because I don't think that programming
paradigm really trustfully exists yet, be it Perl, PHP, Ruby, Python,
whatever. I guess I'm kind of old school in thinking "there's no free
lunch", and that's probably having to do with the database/engineer
background. Ah, well, maybe I'll grow up.

Todd
 
B

Bill Kelly

From: "Rimantas Liubertas said:
In English you do not write every sentence on the separate line, hence
the need to have something to mark the end of the sentence.
Same in Ruby, if you put several statements in one line you use semicolons
to separate them.

Precisely. Further, when we do write phrases on separate lines in English,
as in poetry, punctuation is placed where it belongs, not forced to appear
unnecessarily at the end of every line.

From: "Jenda Krynicky" <[email protected]>
I don't think people get drawn to Ruby because of pretty syntax. I think
it's all marketing. Ruby on Rails is (or is it still?) hip. The new cool
kid on the block.

To paraphrase David Heinemeier Hansson, "f*ck rails."

<grin>

Many on this list have been using ruby long before rails existed.

I was drawn from perl to ruby, eight years ago, because ruby (matz) had
achieved the seemingly impossible: an elegant synthesis of smalltalk and
perl.

I don't feel the need to use OO for everything, but I like OO as a tool.
And OO programming in perl _sucked_. I used to think it was neat that
OO was grafted onto perl with the addition of a single keyword to the
language. But it was such a pain to write OO code in perl, that I rarely
made the effort--even when I really wanted an object. I can still recall
those disappointing deliberations: wow, this bit of functionality I'm about
to implement would be ideal as an object, . . . but . . . eyuuuch . . . too
much of a pain in the ass. So, yes: syntax matters.


Regards,

Bill
 
J

Jeremy McAnally

Did you just join this mailing list to be a douchebag?

I can't believe this conversation is still going. "OMG PERL AND RUBY
HAVE DIFFERNET SYNATXCES." Yes. They do. If you hate Ruby's, that's
fine, but having worked with Perl, PHP, Java, and C# before I found
Ruby, I find it refreshing. The cleaner syntax and more powerful
language structures make C# and friends feel brittle and old.

But everyone's entitled to their own opinion, of course. Just don't
blame people digging Ruby on a web framework and "marketing" (whatever
that means). That's just silly.

--Jeremy

And I don't think Ruby can be made pretty at all.


I hate languages that do not use any sigil. I want to know what is a
variable and what is not and be able to tell the difference at the very
first glance. And not have to think about what methods, functions,
classes, ... exist or might exist in the future when naming my
variables.

And for the semicolons making every line look ugly ... every sentence in
english ends with a dot, except for those that end with a question or
exclamation mark. Does that make the sentences ugly? A statement in a
program is a sentence and a sentence should end with a marker, not fall
off at the end of line unless I bend backwards.


OOP is not a holly grail, the fact that something is made into a class
with getters and setters doesn't make it any better in itself. A class
that only has the default getters and setters is a pointless class. No
matter how easy was it to create it. You should not be creating classes
just because you can, you should do that because it allows for a cleaner
code, because it allows you to hide some complexity from whoever's using
that class.


I don't think people get drawn to Ruby because of pretty syntax. I think
it's all marketing. Ruby on Rails is (or is it still?) hip. The new cool
kid on the block.

Jenda



--
http://jeremymcanally.com/
http://entp.com

Read my books:
Ruby in Practice (http://manning.com/mcanally/)
My free Ruby e-book (http://humblelittlerubybook.com/)

Or, my blogs:
http://mrneighborly.com
http://rubyinpractice.com
 
D

Davi Vidal

Em Friday 13 June 2008, Joel VanderWerf escreveu:
Let's change the subject line, too.

Wouldn't be better leave thread die? JMO...

--
Davi Vidal
--
E-mail: (e-mail address removed)
MSN : (e-mail address removed)
GTalk : (e-mail address removed)
Skype : davi vidal
YIM : davi_vidal
ICQ : 138815296
 
M

Marc Heiler

This discussion has almost died, so let's increase the ante...

I think the solution is much easier. Against perl.

Perl 5.x won't shake the world anymore. It can continue to exist for 100
years but its impact will shrink and shrink. This is inevitable. Only a
few perl hardcore fans refuse to accept this.
Maybe they should read http://www.reddit.com/r/programming/ daily. I do
so and it is very rare to see ANYTHING of relevance come up in regard to
perl.
(Maybe someone has a graph, but I think I read more lisp references
there, than perl references)
I am not saying there aren't any new great apps in perl. I still see
complicated solutions implemented in C and perl in bioinformatics for
example. I am sure there are countless more areas, so perl will not
become irrelevant SOON. It will be a long and slow death as gradually
people will ditch it in favour for another language (probably only ruby
and python to choose from, i dont think php alone can "replace" perl,
but what one has to understand with php is that it lowered the entry
barrier for new, younger coders. Being a "noob" is no problem, because
they have DECADES of years in the life left to LEARN more.)

It is thus moot to discuss about features in perl or solutions in perl
that are "better". Ruby's syntax beats perl's syntax easily (with eyes
closed). Ruby's OOP approach beats perl anytime. I think in fact I could
say that matz designed ruby to beat perl easily.

And perl is already lying on the ground right now ... no sense to jump
on it further.

Perl 6 might be different as far as the "new" factor will be concerned,
at least I know (or read) of people who are interested in it. I am sure
the hordes of C hackers that like perl (there are many of them) will
jump onto perl 6 bandwagon. Maybe perl 6 will generate a lot of interest
and will manage to hold its promises. Up today one can not download perl
6 AND use it easily (like perl 5.x) though, so this sounds like
vaporware until it becomes a reality.

Knowing that perl 5 won't make a large difference anymore due to the
pressure of php, python and ruby against it (on the "scripting language"
environment), I believe perl borders on becoming irrelevant as time
passes by.

The strongest faction of perl users, in my opinion, are the old C
hackers who are too lazy to switch to python or ruby, and don't do any
(or much) web development either. (I know a few that even write their
blog stuff in C ... )
They will be quick to point out mistakes in any other language, but
refuse to acknowledge bigger problems in perl largely. And who can blame
them? If a tool works, it is totally fine to continue using it. Without
php, ruby and python, I think perl might be still extremely popular. But
pitted against these languages, perl showed it's 1980- age.

Comparing perl only to php might make perl a winner for most of everyday
task http://tnx.nl/php but throwing python and ruby into the pool where
people can choose from, will make it very very hard for anyone to pick
up on perl first.
(And besides, if perl's www focus would have been very strong, maybe we
would never have seen the rise of php.)

In fact why should anyone stop using Perl? And will people?
This is a question only perl can answer and I think the ruby mailing
list is not the proper place to discuss what perl needs to do.

For me, ruby beats perl hands down. I am not even writing that much ruby
code actually... It is much nicer to think in domain specific languages
(or instructions, if one wants to say so), keeping the data in
human-readable files, and have no real limit on where to use it
specifically, be it www, GUI, console app or whatever. (People might
come up with the speed issue, but speed is so overrated for everyday
tasks ......)

The only complaint I can have about ruby is that the documentation could
always be improved. The Pickaxe is great, but I think a language should
have at least a great online and up-to-date reference, similar to php,
on the official site.
 
D

Davi Vidal

Em Friday 13 June 2008, Marc Heiler escreveu:
[...]
The only complaint I can have about ruby is that the documentation could
always be improved. The Pickaxe is great, but I think a language should
have at least a great online and up-to-date reference, similar to php,
on the official site.

Indeed. I really need this!

rdoc & ri & irb are great, but php.net/function-name is almost perfect with
examples and comments and description and parameters and return values.

Best regards,
--
Davi Vidal
--
E-mail: (e-mail address removed)
MSN : (e-mail address removed)
GTalk : (e-mail address removed)
Skype : davi vidal
YIM : davi_vidal
ICQ : 138815296
 
V

Vassilis Rizopoulos

Robert said:
2008/6/13 Jenda Krynicky <[email protected]>:

<snip>rant</snip>

You do not have to use Ruby if you do not like to.



That's not true for me. I don't use Rails but I do use Ruby because
of its OO capabilities and the clean syntax. I was attracted way
before the hype and I believe Rails did not even exist at that point
in time.
Ditto . I'm programming in Ruby for more than 6 years now and I still
haven't used Rails :).
Clean syntax, beautiful code, enjoyment in programming!
V.-
 
D

David Masover

I want to know what is a
variable and what is not and be able to tell the difference at the very
first glance.

Difference of philosophy -- with the simple setters and getters, the idea is
to start using it as a variable, but it might not always be.
And not have to think about what methods, functions,
classes, ... exist or might exist in the future when naming my
variables.

So you still have to think about what methods (or functions) exist when naming
your methods (or functions). No one's stopping you from naming variables like
var_foo -- or using mostly instance variables, like @foo (which does have a
sigil).
And for the semicolons making every line look ugly ... every sentence in
english ends with a dot, except for those that end with a question or
exclamation mark. Does that make the sentences ugly?

I don't think so, but I do think it would make syntax ugly, if syntax were
written the way prose were:

while line = gets; fields = line.split("\t"); puts fields[3]; end

As someone else pointed out, in mediums where sentences aren't always written
as part of paragraphs, the period is often dropped -- poetry, for example, or
instant messaging.
OOP is not a holly grail,

Strawman -- I didn't say that.
the fact that something is made into a class
with getters and setters doesn't make it any better in itself. A class
that only has the default getters and setters is a pointless class. No
matter how easy was it to create it.

Actually, there is a point -- such a class is abstract. Contrived example:

class Person
attr_accessor :name, :income, :disposition
end

class Employee < Person
def income
if disposition == :rebellious
0
else
@income
end
end
end

Simple translation: A class can have its attributes overridden -- or you can
outright pass in an object that isn't even inherited, but provides the needed
methods.

A hash, say, makes this much clumsier, though it can still be done.
I don't think people get drawn to Ruby because of pretty syntax. I think
it's all marketing. Ruby on Rails is (or is it still?) hip. The new cool
kid on the block.

You know, I saw an interview question to DHH, asking him why he chose Ruby. It
was all about which language would allow him to write "the most beautiful
code." Or, in other words, it was all about pretty syntax.
 
R

Robert Dober

Hi --



I think the word is "troll" :)

Right, Jenda is one of the most intelligent trolls I have ever seen,
he takes care to write some reasonable posts once in a while and then
he just continues to waste bandwith and all the nice things trolls do,
unless his brain has an on-off switch of course.
Please be aware that I do by no means indicate that he has a brain,
this is beyond my abilities to prove, but as I have called him
intelligent he probably has one, unless he found a ghost writer for
the non trollish posts.

I really feel it is good to have him around, makes this list more like
real life, full of people one would consider calling bad names. I do
not do that however because we have a nice saying here in France:
"Stupid is a property of people who do not think like you" (well
language is actually worse "Un con c'est quelqu'un qui pense
differement que toi").

Dear Kenda maybe you can however find other things to do for some
while, I guess you harmed yourself enough for now.
And just in case you did not notice, this is a non sigil language
mailing list, so you probably posted by error. Do not apologize
however as you are forgiven already :).

Cheers and keep not seeing you out there.
Robert
 
B

Bill Kelly

From: "Bill Kelly said:
To paraphrase David Heinemeier Hansson, "f*ck rails."

<grin>

Apologies for replying to my own post - but it's been bothering me that I forgot
to add a footnote to explain my comment above. And so I worried it might have
sounded harsh to those not familiar with the event my comment puns on.

Thus, here's the footnote I might ought to have included:
http://blog.wekeroad.com/blog/imploding-rails-jesus-dhh-and-the-uncle-ben-principle/
http://www.codinghorror.com/blog/archives/001065.html
(scroll down about a page)


All in fun,

Bill
 
J

Joerg Meltzer

You can get bitten by this. Everything is call-by-reference, not
call-by-value as in Perl, C etc. Change a function's parameter and you
change the original, not a local copy of it.

Perl is call-by-reference when you modify the arguments array @_
directly.
It is call-by-value when you copy the arguments (which is the
convention).
<verbatim>
sub cbr{ $_[0]++ }
$var = 1;
cbr($var);
print $var; # gives 2

sub cbv{ my ($foo) = @_; $foo++ }
$var = 1;
cbv($var);
print $var; # gives 1
I find the contrary. Uncommented Perl is typically impossible to
understand unless you wrote it yourself. It *is* possible to write clear
Perl but, as with C, most people don't bother.

People just love to be lazy.
However I find that given the right tools (use strict; perltidy,
perlcritic, a good ide e.g. Eclipse/Epic) it is relativly easy to write
maintainable perl code.
 
M

Marc Heiler

However I find that given the right tools (use strict; perltidy,
perlcritic, a good ide e.g. Eclipse/Epic) it is relativly easy to write
maintainable perl code.

Compared to what? It takes discipline to write good code. Some languages
make it easier.

Maintanable is something completely different though. I find it hard to
maintain code someone else wrote. I need time to dig into it, and often
I just adjust his style to my style (no matter what language was used).

Well written code is always better than badly written code.

I also think to compare pure source code one should only use notepad,
and in this scenario ruby beats perl with eyes closed any time ;)
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top