|
|
|
|
|
by wavesounds
4668 days ago
|
|
OOP: This is done with Functions not Classes.
Inheritance: Theres at least 3 different ways of doing this, 2 of them suck again use Functions instead of Classes.
Scope: Variables outside a function are global and theres no block scoping.
First Class Functions: This is not something most people are used to and can become confusing
Calbacks: Callback Hell, you can shoot yourself in the foot and mess up your code if you don't put extra thought keeping things organized and thinking through async/sync
Closures: Theres function scoping but not block scoping, this can be confusing if you're used to block scoping
Compile Time Errors: Theres very few compile time errors. If you are using a Function that requires the "new" keyword and you forget it your code will still run and all sorts of wacky things will happen. Yes other languages have these features but they are harder in Javascript, thats why Javascript is a harder language. Look into Meteor.js - try doing that in PHP. That's how so. And you can write Sync code if you want to. |
|
> try doing that in PHP
Meh, PHP is still the king, and it will stay there for a long time. Languages and platforms with crazy features pop up every day, but that's not enough for actually getting things done. You need a community, mature libraries, and a healthy ecosystem in general.
If you want something challenging try Clojure. It is by far The Best Language (tm) IMO, but you still can't even build a website with it. The only web framework available died and got separated into libraries, and everyone ends up wiring everything the way they can. Some people use Java libraries, some others reimplement everything. It's pretty messy.