3 ms·
> ditching Python on account of it being too complex > chooses NodeJS Congratulations on picking a language with even more weird pitfalls and edge cases? JS
by FridgeSeal 7y ago
> ditching Python on account of it being too complex
> chooses NodeJS
Congratulations on picking a language with even more weird pitfalls and edge cases?
JS is not what I’d call a simple, straightforward language.
- koonsolo 7y agoI care about writing clean and simple code in an easy way. I found that the node ecosystem with npm packages allows me to do this very well. I had that same feeling in the 2.4-2.5 days of Python. But now it was really hard to find simple API's. Let me give you an example about parsing JSON. This is the Python way: json.load(fp, , cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, kw) Seriously, how F(&#$%@ING complex can you make the thing? This is Javascript: JSON.parse(text[, reviver]) Ah, that's the way I like it :) But hey, if you want all that argument power, no problem for me. I'm a simple programmer, liking simple things. And that was my point, Python has lost its simple ways. The JavaScript language might have some weird shit, but I don't care about that because I can stay far away from it. I care about simple programming.
- Cpoll 7y ago> json.load(fp, , cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, kw) It looks like you copied that from https://docs.python.org/3/library/json.html https://docs.python.org/3/library/json.html Those are all optional parameters, if you don't need them it's just: json.load(fp) Which, to the best of my knowledge will behave just like the JS version.