Re: Can you please give me some advice?
- From: Bruno Desthuilliers <bdesth.quelquechose@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 29 Sep 2007 19:17:43 +0200
cmpython@xxxxxxxxx a écrit :
(snip)
I know nothing of Ruby, but just the fact that in Ruby the Hello World
program is
puts 'Hello, World!'
whereas the Python Hello World program is
print 'Hello, World!'
suggests to me that Python is more intuitive because the word "print"
has a meaning in English that makes sense given what you want to do,
but "puts" just doesn't.
Hem.... Sorry, but it reminds me of the most clueless comments on Python I've seen on c.l.ruby. I really don't think Python is more or less "intuitive" than Ruby, and making a judgement on such a pointless detail is not even worth the bandswith IMHO. FWIW, 'puts' means 'put string' (implied : on stdout), which is certainly much more semantically correct than what 'print' implies. When stdout is redirected to a socket that send bytes to a client program - like, say, a browser -, you're certainly not "printing" anything.
Anyway, at this level, Python and Ruby are surprisingly close to each other.
And, as someone who has been learning Python
from almost no knowledge of programming, I've found it is not too bad
in trying to keep as reasonably close to a natural language like
English
as possible.
Here again, Ruby claims (or at least some rubyists do) that Ruby is as close as possible to "natural language". With examples like:
5.times do {
something
and_something_else
}
which is arguably more "intuitive" than:
for i in range(5):
do_something()
and_something_else()
I also think the mandatory indenting of Python is helpful in forcing
new programmers to be neat and see code blocks quickly. Plus I doubt
the Ruby community has such a large group of helpful people
While perhaps smaller, the Ruby community is (AFAICT) known for being very active and helpful.
and
libraries
and such (but I could be wrong about that, just assuming it based on
the
fact that Python has been around longer).
On this last point at least, you're probably right !-)
On the other hand, perhaps because Ruby is newer it has been able to
freshly start with advantages learned from the difficulties of other
languages. Byung-Hee Hwang ought to go the Ruby group and see what
they are saying.
Indeed. Or even better, try both languages and find out which one he likes best. Implementation and 3rd part libs set aside, I could not say one is better than the other, so it's mostly a matter of personal taste and affinities.
As far as English goes, Byung-Hee, you have to admit English grammar
is easy
Would you say French is easy ? Because as far as I'm concerned, I find it the easiest language ever. Could it be because I'm french ?-)
(snip)
.
- References:
- Can you please give me some advice?
- From: Byung-Hee HWANG
- Re: Can you please give me some advice?
- From: Steven D'Aprano
- Re: Can you please give me some advice?
- From: cmpython
- Can you please give me some advice?
- Prev by Date: Re: sorteddict [was a PEP proposal, but isn't anymore!]
- Next by Date: xyz points and magnitude to intensity or colormap or contourmap
- Previous by thread: Re: Can you please give me some advice?
- Next by thread: Re: Can you please give me some advice?
- Index(es):
Relevant Pages
|