Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of rafael (2125)

Monday February 13, 2006
05:06 AM

Indentation constraints and Python design

[ #28662 ]
Interesting quote by Guido about the language design principles that guide python's evolution :

I find any solution unacceptable that embeds an indentation-based block in the middle of an expression. Since I find alternative syntax for statement grouping (e.g. braces or begin/end keywords) equally unacceptable, this pretty much makes a multi-line lambda an unsolvable puzzle. -- Language Design Is Not Just Solving Puzzles

(via LtU)

So, choice of basic grammar rules has an influence on language features -- nothing really new here. Perl 5 and Perl 6 have complex, expressive syntax, where blocks in expressions are familiar, because easy to do. That doesn't mean they're necessarily superior at every point of view. But that shows they're optimized for versatility; while Python's grammar is constantly changing, sometimes without ensuring backwards compatibility. In Perl 5 you can have idioms, or new programming paradigms (look at how Catalyst uses attributes for example), while being able to run Perl 4 scripts. That would be another advocacy point. Get the new cool stuff without throwing away the old one.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.