February 12th, 2020 at 7:06 PM
The exact thing you describe with JavaScript drives me up a wall with PHP. It has many of the same issues. It’s hard to predict what something will do if you’re used to how it works in another language. My biggest issue with PHP is how it lets you check a variable that’s undefined in a conditional branch statement. It shouldn’t let you do this. There will almost always be a bug if the variable you have in an IF statement isn’t defined. But PHP just throws a notice at you and continues like nothing happened. If your host isn’t configured to display these, you won’t even see it. And if it is, you’ll see a lot of notices from other people’s poor code.
Every programming language has a trade off I suppose. If you could make python fast out of the box, it’d be a godsend for a lot of people. Right now, Java is what you use if you want portability and speed, but Java is much harder and has a higher learning curve.
But as you say, native is the way to go for speed. Cython is about to be my go to if I can get away with it. I’m not uncomfortable with C, but I can still write code much faster in Python, even if I have to declare types.
Every programming language has a trade off I suppose. If you could make python fast out of the box, it’d be a godsend for a lot of people. Right now, Java is what you use if you want portability and speed, but Java is much harder and has a higher learning curve.
But as you say, native is the way to go for speed. Cython is about to be my go to if I can get away with it. I’m not uncomfortable with C, but I can still write code much faster in Python, even if I have to declare types.