6 ms·
After such a long and painful road from 2 to 3, I feel like the Python developers aimed too low in fixing the legacy problems that existed in 2. All that time
by Pxtl 9y ago
After such a long and painful road from 2 to 3, I feel like the Python developers aimed too low in fixing the legacy problems that existed in 2.
All that time for Unicode. Not concurrency or type safety or static guarantees or better lambda syntax or anything fun like that. Just Unicode.
- ant6n 9y agoBut you also got the "print-tax"!
- minitech 9y ago> type safety The text changes are type safety, but there are many more miscellaneous type safety improvements (like the default comparison between types (alphabetically by type name, except NoneType!) being removed, so now you can use set comparison operators with confidence) – plus support for type annotations.
- Ivoah 9y ago> better lambda syntax What do you mean by better lambda syntax? Is there something that you feel isn't adequate in the current syntax?
- bastawhiz 9y agoIt's a bit verbose. A lambda with a single one letter param takes ten characters to write: `lambda x: `. In JS, it's 5: `x => `. Ruby blocks take sevenish: `{|x| }`. Six in haskell.
- tome 9y agoHow did you get six for Haskell? I get five if you require a space at the end \x->
- bastawhiz 9y agoI was counting a space after the x.
- Pxtl 9y agoAlso, still no support for multi-line lambdas is there?
- rollcat 9y agoMulti-line lambdas will never happen. Lambdas are expressions. "Multi-line" means statements. There is no sane way you could embed statements into an expression with whitespace-based block syntax.
- Pxtl 9y agoFine, not technically lambdas, but still: function bodies declared inline in function calls. This provides great flexibility in higher-order functions. > There is no sane way you could embed statements into an expression with whitespace-based block syntax. Ruby does it. Of course, Ruby has a limitation that a function call may only have one "block", but still - Ruby blocks are statements embedded into an expression in a whitespace-based syntax.
- pseudalopex 9y agoRuby has explicit syntax to end groups of statements. Python is equally powerful when it comes to higher-order functions; it just enforces a flatter, more explicit style.