I really like the ternary operator in theory. Beeing able to have branching in an expression is lovely, but I hate how hard it is to read in JS (exponentially worse for nested branches).
I think python chose a way better syntax for expression branching:
Instead of:
I do feel more and more drawn towards a more functional / declarative style of programming. It makes it (at least for me) more intuitive (both when reading and writing), than either imperative or object oriented.
Hi, I am Bello Osagie, a tech blogger, writer, and web developer. I teach web development for free… Join me to learn, discover, and have fun coding together!
That may be true because some people will disagree with you. But generally, python has a better syntax. That is why Python is used for complex code structure in AI,machine Learning, data science, etc.
If you already know JavaScript on the browser or web, I recommend trying out Brython...
But JS has it's pros, too. In python I do miss having functions as first class objects (although that might help python, still. Making it more clear). And everything async feels slugish in python compared to js.
I enjoy switching back and forth every now and again.
Hi, I am Bello Osagie, a tech blogger, writer, and web developer. I teach web development for free… Join me to learn, discover, and have fun coding together!
I really like the ternary operator in theory. Beeing able to have branching in an expression is lovely, but I hate how hard it is to read in JS (exponentially worse for nested branches).
I think python chose a way better syntax for expression branching:
Instead of:
You got:
FYI: dev.to/peerreynders/comment/1a73d
I do feel more and more drawn towards a more functional / declarative style of programming. It makes it (at least for me) more intuitive (both when reading and writing), than either imperative or object oriented.
I'm not sure that Python is the right "medium" for a functional/declarative style.
That may be true because some people will disagree with you. But generally, python has a better syntax. That is why Python is used for complex code structure in AI, machine Learning, data science, etc.
If you already know JavaScript on the browser or web, I recommend trying out Brython...
I'll give Brython a go, never heard of it :D
But JS has it's pros, too. In python I do miss having functions as first class objects (although that might help python, still. Making it more clear). And everything async feels slugish in python compared to js.
I enjoy switching back and forth every now and again.
That's because you used Python... It happens to everyone at some point...