
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] ruby and python in Japan
Zev Blut writes:
> On Mon, 26 Feb 2007 13:33:17 +0900, Stephen J. Turnbull
> <stephen@??> wrote:
>
> > Zev Blut writes:
> >
> > > Well, this is not restrictive but an annoying aspect is that you must
> > > explicitly declare self in all of your instance methods. It makes the
> > > OO aspect of Python feel tacked on.
> >
> > Ah, you haven't drunk the Kool-Aid. This is an instance of "explicit
> > is better than implicit." I think you should check your mental model
> > of OO. I'm not saying that your annoyance is unwarranted---whatever
> > makes you more productive works for me. My point is that OO and
> > implicit arguments are independent constructs.
>
> I am sorry but I must disagree, this simply reeks of an implementation
> detail.
Well, that's exactly *my* point. It's not that this couldn't have
been added (subtracted?) to the language, it was a deliberate choice.
> Anyway, I don't want to get into a language war
That's not the point. Note that the statement I made is completely
independent of the Ruby v. Python context.
Anyway, I'm not arguing from information, I'm asking from ignorance.
I'd like to know something about Ruby before I invest time in it. As
you say, Haskell is attractive because it's very different. Ruby is
only interesting to me if (a) I need to hack an existing Ruby
application (I don't yet) or (b) Ruby has genuine advantages over
Python. You claim that (b) is the case:
> so I will end it with this. I think Ruby and Python have a number
> of similar attributes, but that Ruby has a significantly stronger
> OO model and other
But where is it "stronger"? What is it that Ruby's model makes
possible, or at least significantly easier and less fragile than in
Python's?
> techniques like blocks and lambdas that make it a bit strong than
> Python.
Python *has* lambdas; it just doesn't have anonymous ones (I don't
consider the toy "one-line lambda" a real lambda). Python's functions
are first class objects; they can be assigned and queried, you can use
them to build closures, and you can define local functions (as
contrasted with methods). Again, this seems to be a minor case of
syntactic sugar to me.
Blocks are another matter. I don't really understand blocks; what are
they good for?
> I have looked at Python, but since I know Ruby I do not find
> it compelling to learn unless I am going to be paid to do it.
Sure; that seems to be everybody's conclusion in both directions.
These languages are close substitutes, much closer than Perl or Lisp
for either.
Home |
Main Index |
Thread Index