5 ms·
> The two languages have nothing in common beyond both being functional, That's good enough for most people. From experience switching quickly between the two
by rdtsc 9y ago
> The two languages have nothing in common beyond both being functional,
That's good enough for most people. From experience switching quickly between the two paradigms takes a bit longer than staying with the same one. That is once think about reducers, closures, immutable data it's easier to stay in that mindset then going back to mutable objects and attributes.
- macintux 9y agoHave spent a lot of time doing Python after a few years in Erlang, and I've wasted a lot of time chasing down stupid mistakes because I still tend to think immutability when it isn't warranted. I love useful constraints.
- rdtsc 9y agoI am using both, and I find that at least in Python I started using more functions and passing the state around. A nice side-effect is that also makes that code more testable as there is less need for mocks (since functions are more pure), but it's also more verbose and people think I am crazy now. Though also Python in a sense already has some extra state visibility by passing self around in member function as opposed to hiding in an implicit this.
- macintux 9y agoYeah, I implemented a state loop since my process is relatively short-lived. I'm sure anyone who knows Python would hate my code, and I'm not particularly proud of that: I simply don't know the usual idioms. I was excited when I discovered accidentally that tuple unpacking in function heads was supported in Python, then depressed when I discovered that was dropped in Python 3, "because no one uses it". Sigh.