Hacker News new | past | comments | ask | show | jobs | submit login

> OOP, inheritance, scope, first class functions, callbacks, closures, compile time errors

How does any of that make it harder than "most web development languages"?

> The advantage is you can do real time async stuff a lot better then with other frameworks.

How so? AFAIK, the only difference is that in Javascript you can only do async stuff, you don't really have a choice.




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.


I know all this, but I still don't think it's any harder than other languages. I have been following Meteor since the beginning, but I'm not impressed anymore to be honest. Seeing the video for the first time was quite shocking, but in the end they didn't really deliver. Using it is still a pain.

> 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.


Most javascript code is actually synchronous. It is the event loop (xhr requests, timers, timeouts, etc.) that is async. TLDR, some parts of the language are sync, some are async




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: