back to list

Python vs. Scheme/Lisp/Ruby

🔗Aaron K. Johnson <akjmicro@...>

8/29/2004 8:24:51 AM

On Sunday 29 August 2004 12:49 am, Carl Lumma wrote:
> > (Aaron wrote):
> > What could you possibly hate about Python? Let me guess--you
> >are addicted to parentheses? (i.e. you are part of the
> >Python vs. Lisp wars)
> (Carl wrote):
> No, the indents are actually my favorite part. My main qualms
> are with the oo syntax, where I like Ruby better but still not
> to the point of liking it. The problem is, when it comes to
> something like programming language syntax, I can basically carve
> wood with my ass. The only way I'll ever be satisfied is to
> write my own language, which I do plan to undertake one day.
> And yes, I plan to use Scheme.

I don't have experience using Ruby, so I can't speak for it. I can say that
being a Python user first, and loving it, would seem to mean that one is
partial to think of Ruby as an inferior 'Python wannabe', and that it's a bit
more obtuse-looking on the page (screen). Honestly, not being an 'OO weenee'
myself, I rarely use Python for it's 'OO features' (oddly enough, because it's
highly touted for them). I'm more comfortable writing functional/imperative
type programs anyway. And yes, indentations for block style programming kick
ass, and it's a shame language designer before Guido van Rossum didn't pick
up on that feature. Fuck braces, man.

In theory, I like the idea of Scheme/Lisp syntax. And it has a long cherished
history and tradition in academic circles. And yes, it is aesthetically
appealing. But in practice, I want to *get things done*, so I hate it's
syntax, which is easy for computers, but hard for humans to parse. And, both
seem not to have kept up with modern library functionality (ex. Web-based
libs...). Web searches for Lisp/Scheme libraries give one pages that were
last updated in 1998, it seems, on average. Ouch...if that doesn't indicate
'dead language' I don't know what does. Correct me if I'm wrong, though.
Also, I left the Scheme/Lisp world in disgust over *that*, plus the
unfriendly types on their respective usenets who were so unhelpful and
disdainful of newer users. For a laugh (or a cry), look in the usenet
archives for 'Erik Naggum', the Lisp worlds' Brian McLaren, for an example of
what I mean. In contrast, Python people are/seem to be knowledgeable,
friendly and community-oriented.

Another factor for me that killed Scheme/Lisp is the utter fragmentation of
their distribution. There is no standardization, in spite of the 'ANSI
common' claims. One couldn't guarantee that one could find all the features
or libraries one needed in any one distribution, or that code that works in
one would work in any of the others. Every vendor/implementor is off doing
their own little fetish. That is an absolutely untenable situation AFAI am
concerned, for any programming language. Python, Ruby, and even lame-ass-Perl
(which is about the most heinous language syntax ever invented...I piss on
Perl and on Larry Wall with utter contempt) don't suffer this, because there
is one central place making/defining the language.

A final note--I've come down, after back-and-forth thinking about it, on the
side of infix math operators. I know, I know---RPN calculators are cool, but
in a programming language, I find it gets the jobs done easier to think like
a mathematician does, or like we all were taught in grade school, about how
to write equations down.

Peace,

Aaron Krister Johnson
http://www.dividebypi.com
http://www.akjmusic.com

🔗Carl Lumma <clumma@...>

8/29/2004 9:59:40 AM

>>No, the indents are actually my favorite part. My main qualms
>>are with the oo syntax, where I like Ruby better but still not
>>to the point of liking it. The problem is, when it comes to
>>something like programming language syntax, I can basically
>>carve wood with my ass. The only way I'll ever be satisfied
>>is to write my own language, which I do plan to undertake one
>>day. And yes, I plan to use Scheme.
>
> I don't have experience using Ruby, so I can't speak for it.
> I can say that being a Python user first, and loving it,
> would seem to mean that one is partial to think of Ruby as
> an inferior 'Python wannabe',

It's more of a Perl wannabe, and a great improvement on that
wasp's nest if you ask me.

> Honestly, not being an 'OO weenee'
> myself, I rarely use Python for it's 'OO features' (oddly
> enough, because it's highly touted for them). I'm more
> comfortable writing functional/imperative type programs
> anyway.

The two are not mutually exclusive.

> In theory, I like the idea of Scheme/Lisp syntax.
//
> But in practice, I want to *get things done*, so I hate
> it's syntax, which is easy for computers, but hard for
> humans to parse.

I find it very easy to parse, but that may be because
it was the first language I learned (other than BASIC).

> And, both seem not to have kept up with modern library
> functionality (ex. Web-based libs...).

Yeah, it's a problem.

> A final note--I've come down, after back-and-forth
> thinking about it, on the side of infix math operators.
> I know, I know---RPN calculators are cool, but in a
> programming language, I find it gets the jobs done
> easier to think like a mathematician does, or like
> we all were taught in grade school, about how
> to write equations down.

I've always hated infix. Hated it in gradeschool, hated
it when learning C and Java. Mathematicians don't have
to deal with assignment. Scheme is plain polish by the
way, rather thna RPN.

Ok, now I will make a confession re. functional v.
imperitive. Functional is more compact, more reusable
and probably easier to maintain. But, unless you're
one of the few who are just smart enough to do it, I
think the extra difficulty of functional programming
is hard to justify. It's harder to write and harder
to read, compared to good imperitive code (yes,
imperitive lets programmers get away with writing
worse code). I think imperitive is so much more
popular for a reason: humans are used to thinking in
terms of stepwise actions in their environment. For
this reason I do not even buy the 'lisp is good for
teaching programming' argument, and I think this goes
a long way in explaining why so few good programmers
come out of MIT these days. :)

Yes, both styles are natural for their own styles of
problems, which is why both Scheme and Python support
both, but on balance, I acknowledge that I need to
adopt an imperitive lang.

-Carl

🔗Aaron K. Johnson <akjmicro@...>

8/29/2004 11:31:11 AM

On Sunday 29 August 2004 11:59 am, Carl Lumma wrote:
> >>No, the indents are actually my favorite part. My main qualms
> >>are with the oo syntax, where I like Ruby better but still not
> >>to the point of liking it. The problem is, when it comes to
> >>something like programming language syntax, I can basically
> >>carve wood with my ass. The only way I'll ever be satisfied
> >>is to write my own language, which I do plan to undertake one
> >>day. And yes, I plan to use Scheme.
> >
> > Aaron wrote :I don't have experience using Ruby, so I can't speak for it.
> > I can say that being a Python user first, and loving it,
> > would seem to mean that one is partial to think of Ruby as
> > an inferior 'Python wannabe',
>
> It's more of a Perl wannabe, and a great improvement on that
> wasp's nest if you ask me.

How is it similar to/different from Perl? Can you elaborate?

> > Honestly, not being an 'OO weenee'
> > myself, I rarely use Python for it's 'OO features' (oddly
> > enough, because it's highly touted for them). I'm more
> > comfortable writing functional/imperative type programs
> > anyway.
>
> The two are not mutually exclusive.

True, it's just that I don't tend to think in OO.

> > In theory, I like the idea of Scheme/Lisp syntax.
>
> //
>
> > But in practice, I want to *get things done*, so I hate
> > it's syntax, which is easy for computers, but hard for
> > humans to parse.
>
> I find it very easy to parse, but that may be because
> it was the first language I learned (other than BASIC).

Could be the reason....

> Ok, now I will make a confession re. functional v.
> imperitive. Functional is more compact, more reusable
> and probably easier to maintain. But, unless you're
> one of the few who are just smart enough to do it, I
> think the extra difficulty of functional programming
> is hard to justify. It's harder to write and harder
> to read, compared to good imperitive code (yes,
> imperitive lets programmers get away with writing
> worse code). I think imperitive is so much more
> popular for a reason: humans are used to thinking in
> terms of stepwise actions in their environment. For
> this reason I do not even buy the 'lisp is good for
> teaching programming' argument, and I think this goes
> a long way in explaining why so few good programmers
> come out of MIT these days. :)

Functional code reduces to imperative code at the machine level, eventually.
I think functional thinking is very powerful, esp. if the implementation
allows for in-place variable update, so as not to waste stack space (e.g.
Scheme, with it's tail-recursive feature) I suspect this is now standard with
most languages nowadays.

One bad about Python is that it is a pretty heavy cost speed-wise to
repeatedly call a function from a loop--it's better to prototype the
functions, then do inline code during a loop.

Aaron Krister Johnson
http://www.dividebypi.com
http://www.akjmusic.com

🔗Carl Lumma <clumma@...>

8/29/2004 12:37:30 PM

>> [Ruby]'s more of a Perl wannabe, and a great improvement
>> on that wasp's nest if you ask me.
>
> How is it similar to/different from Perl? Can you elaborate?

Sorry, I'm cutting this thread off. No time. There
are many good Ruby tutorials on the web if you're interested.

> Functional code reduces to imperative code at the machine
> level, eventually.

Obviously.

> I think functional thinking is very powerful, esp. if the
> implementation allows for in-place variable update, so as
> not to waste stack space (e.g. Scheme, with it's
> tail-recursive feature) I suspect this is now standard with
> most languages nowadays.
>
> One bad about Python is that it is a pretty heavy cost
> speed-wise to repeatedly call a function from a loop--it's
> better to prototype the functions, then do inline code
> during a loop.

Yeah. I'm not aware of any particular performance hit in
Scheme for using its imperitive stuff, but then again Scheme
isn't all that fast to begin with (though apparently Bigloo
is pretty good).

-Carl