|
|
|
|
|
by kerkeslager
2170 days ago
|
|
> How about some variation of: (x, y) -> x*y for lambdas? Why? What problem are you trying to solve here? That syntax is inconsistent with other syntax in Python and is harder to type (lambda gets tab-completed after typing two home-row characters). > Scala's method for dealing with laziness through views and iterators works really well. If you're okay with generic iterables in Scala, I'm unsure what your objection to iter types in Python is. |
|
map, filter, zip, etc should produce concrete values, not iterators. It's annoying to constantly turn iterators into lists. Like if scala's map or fold took in a list and produced an iterator, that would be super annoying. There's no point. If you want an iterator, turn the collection into an iterator. There's no reason for a function to take a list and return an iterator, unless that function is 'toIter.'
Ugly python:
Julia: Or even better Julia: I dunno, it's like Python tries its best to make code super verbose and ugly. I just don't understand why it is the way it is. It doesn't make sense.