3 ms·
Pythonistas when a language doesn't follow PEP8 and doesn't have a GIL. >EXCEPT when you need to do anything else to the iterator, then its ugly God forbid yo
by ohgodplsno 4y ago
Pythonistas when a language doesn't follow PEP8 and doesn't have a GIL.
>EXCEPT when you need to do anything else to the iterator, then its ugly
God forbid you use one (1) whole variable to write
let enumerated_something = something.iter_mut().filter(|| {...}).enumerate()
for (i, x) in enumerated_something { ... }
>BUT when you try to use it with iterators -- which are also amazing, I love using iterators -- IT DOESNT WORK.
Pythonistas when you can't throw in the middle of a closure to end your loop. What is .map { } supposed to do ? Abort early but still stay alive ? Abort early and just return the first two elements that didn't fail ?
Or, you could define a Iterable<T>.map_or_none() that returns a bunch of Result/Options as an output, and be done with it.
>Again, the absolute lack of composability is astounding.
Coming from someone using python where extensions methods are a pipe dream and function(compositions(are(written(in(a(style(that(makes(me(want(to(go(back(to(lisp)))))))))))))), that's rich.
- jamincan 4y ago> function(compositions(are(written(in(a(style(that(makes(me(want(to(go(back(to(lisp)))))))))))))) I think you got that backwards. I'm pretty sure it's supposed to be lisp(to(back(go(to(want(me(makes(that(style(a(in(written(are(compositions(function))))))))))))))
- tmtvl 4y agoOr even... (-> function compositions are written in a style that makes me want to go back to lisp)