News for hackers. Stuff that matters.
Re:Guido's final word on Tail Calls by amix on Tuesday April 28, 2009 @06:49AM (#582950)
I really love Guido's pragmatism. It's inspiring how he says "no" to a "would be nice feature" - - a feature that seems simple to implement at first, but probably would complicate a lot of things.

Viva la Gudio :)

Re:Guido's final word on Tail Calls by jballanc on Tuesday April 28, 2009 @11:29AM (#583277)
The subtle overtone here is the rather sensible conclusion that Python is not going to be an "everything language". I think the defining characteristic of a successful language designer is the ability to recognize and acknowledge the inherent limitations in your own language.
Re:Guido's final word on Tail Calls by anc2020 on Tuesday April 28, 2009 @10:06AM (#583119)
FTA: > One other thing I learned is that some in the academic world scornfully refer to Python as "the Basic of the future".

I'm not from the academic community and have never heard anyone else say it before, but have thought of Python this way for quite a while now and am pleasantly surprised to see I'm not alone.

Thats not me being snarky, its a very serious observation - you'd get laughed at for learning Basic today. I'm young and expect Python to die well before the end of my professional career, so I do invest my time in longer term languages such as Scheme and Haskell.

Re:Guido's final word on Tail Calls by jacobian on Tuesday April 28, 2009 @11:18AM (#583243)
I [...] expect Python to die well before the end of my professional career [...]

Why?

I do invest my time in longer term languages such as Scheme and Haskell.

What makes Scheme and Haskell "long-term" languages?

Re:Guido's final word on Tail Calls by anc2020 on Tuesday April 28, 2009 @04:12PM (#583937)
> Why?

Obviously I can't know it for sure, but my argument hinges on parallelism. Imperative programming isn't so well suited to parallelism as you probably know, and Python is sticking firmly to the imperative pseudo-code area of programming (which it does very well). Even for the scripting tasks I think in 10 years time it'll just be unacceptable to have so many cores under-utilised and functional languages make parallelism so much easier that it'll be a fairly easy choice to start coding a new project in those languages instead of Python. And then on top of this main argument, I'll just say you never know - I don't think people would have predicted the decline Perl has had to such a big degree (sure its not dead but its going that way). Python won't be here in 100 years (or 200, or 300..), I'm 100% sure. So I'm just arguing that the actual number of years left of Python is likely to be within 30 years. No-one knows the exact length, but my prediction is that its within that range.

> What makes Scheme and Haskell "long-term" languages?

They're just very simple and pure, and that's important for longevity because they aren't likely to be replaced in a kind of "major revision change" by a similar but better language, because they don't really need a big revision change, they're very good (or should I say "good enough") already. Python just doesn't so obviously provide the best language of its kind (dynamic, OOP, imperative) and is prone to be replaced by a different kind of language or a slightly different language of the same kind.

Both my answers are long enough that no doubt there'll be holes to pick in them. Eg. Should I have said "Scheme"? Well I don't think Scheme will ever make it big, but I do still think it'll be around in the long term to much the same degree it is now.

* By long term I meant at least 100 years for both Scheme and Haskell.

*Edit: That was a bit big, I'd like to correct it to "at least 30 years, and quite likely 100 years"

Re:Guido's final word on Tail Calls by ramchip on Tuesday April 28, 2009 @12:45PM (#583486)
I don't really expect Scheme to make a huge comeback (especially when there's Clojure to play around), nor do I think Python will die very quickly, so I don't fully agree with the poster.

However, a lot of new ideas are tried in Haskell, and I wouldn't be surprised if it gained importance as people make it more accessible. It's a very powerful and concise language.

Re:Guido's final word on Tail Calls by owinebarger on Wednesday April 29, 2009 @12:06AM (#584546)
If nothing else, implementing a reasonably efficient but basic Scheme interpreter is a short exercise that can be done in a pinch. "Reasonably efficient" is a consequence of the proper tail recursion.
Re:Guido's final word on Tail Calls by orblivion on Tuesday April 28, 2009 @12:04PM (#583383)
Well I've thought of Python that way for a while too, before I saw anybody else say it, but I meant it in a good way. It's like BASIC but actually useful.
Re:Guido's final word on Tail Calls by Xichekolas on Tuesday April 28, 2009 @01:58PM (#583648)
I can see that connection, but not for the reason you list.

To me, Python is most like Basic in that new programmers can get started with it easily, unlike, say, Scheme or Haskell.

(And I love Scheme, but I have no illusions that it's a 'long term' language. I think something lispy will still be around long term, just not sure I'd put my money on Scheme.)

Re:Guido's final word on Tail Calls by finin on Tuesday April 28, 2009 @12:59PM (#583512)
I love 'Basic of the future' as a slur/compliment for a programming language.
Re:Guido's final word on Tail Calls by WilliamLP on Tuesday April 28, 2009 @03:51PM (#583896)
If Python is the Basic of the future, then what is the PHP of the future?
Re:Guido's final word on Tail Calls by danbmil99 on Tuesday April 28, 2009 @06:33AM (#582940)
nice hack returning the next function in the chain. As a FSM user I will probably need this someday.
Re:Guido's final word on Tail Calls by adamc on Tuesday April 28, 2009 @07:58AM (#583001)
As the comments mention, it's an old technique called a trampoline.
Re:Guido's final word on Tail Calls by magv on Tuesday April 28, 2009 @08:14AM (#583017)
I am surprised (and to some extent disappointed) that he did not know about trampolines, as it's common knowledge among language implementors (e.g. it's used everywhere to implement proper tail recursion for FFI calls).

Somehow I though that being a language creator (or working on a compiler for a decade) implies unimaginable amount of knowledge...

Re:Guido's final word on Tail Calls by briancooley on Tuesday April 28, 2009 @09:52AM (#583105)
Doing a lot trumps knowing a lot, even when you make mistakes. It's amazing what GVR has accomplishled despite (apparently) being ignorant of things other language designers know about.
Re:Guido's final word on Tail Calls by eru on Tuesday April 28, 2009 @09:24AM (#583068)
Guido didn't even know about ephemeral and persistent data structures (see early comments at [1]). At least not by that name.

But that's not a problem. Python, Perl etc have caught on, while Haskell has still a long way to go.

[1] http://neopythonic.blogspot.com/2009/04/tail-recursion-elimi...

Re:Guido's final word on Tail Calls by Hexstream on Tuesday April 28, 2009 @11:50AM (#583335)
If he hadn't built so much, he might have had time to learn all that "theoretical" stuff (that can actually help in practice)...
Re:Guido's final word on Tail Calls by 10ren on Tuesday April 28, 2009 @10:58AM (#583198)
Another point of view is to be disappointed in language theory, if one can be so incredibly successful without it.

Reminds me of Edison.

Re:Guido's final word on Tail Calls by parenthesis on Tuesday April 28, 2009 @11:07AM (#583215)
I think GvR's special expertise is more in the 'user-interface' of programming languages than in their implementation. The whole point of Python, really, is to put the former before the latter; which is exemplified in GvR's 'readable-stack-traces before fancy-features-in-the-implementation' reasoning on the present point.
Re:Guido's final word on Tail Calls by 10ren on Tuesday April 28, 2009 @11:51AM (#583337)
Even if you’re designing for professional programmers, in the end your programming language is basically a user-interface design. You will get much better results regardless of what you’re trying to do if you think of it as a user-interface design. Alan Kay http://queue.acm.org/detail.cfm?id=1039523
Re:Guido's final word on Tail Calls by amalcon on Tuesday April 28, 2009 @09:47AM (#583092)
I was just starting some state-machine code in Clojure last night, thought about how to best do it functionally (recur doesn't let you cross function boundaries), and said out loud "I'll use a trampoline!"

If that happens again, I can tell the person I confused not to feel badly, because even Guido van Rossum didn't know about trampolines until recently.

Re:Guido's final word on Tail Calls by alphazero on Tuesday April 28, 2009 @02:38PM (#583735)
Rich Hickey discussed his using the trampoline pattern in the clojure implementation a while ago: http://groups.google.com/group/clojure/browse_thread/thread/...