Hacker News new | ask | show | jobs
by funkah 5260 days ago
Oh, I guess all the JS devs who work in the language every day didn't get the memo.

But in all seriousness, who couldn't have guessed that there would be some Flash/Actionscript dead-enders? Incredibly unsurprising that this was posted on adobe dot com.

1 comments

I work with Javascript everyday.

And I hate it. It is broken as a language (var hoisting, this can mean pretty much whatever you want it to, no types, not even a good damm s32int).

But it works on all platforms and so it will always beat Flash.

You might want to try out CoffeeScript with contracts:

http://disnetdev.com/contracts.coffee/

Compiles to beautiful JavaScript and gives programmers the ability to check types at compile-type. If you've never used it, I'd compare CoffeeScript to an amalgam of Ruby and Python, with a little Haskell thrown in (take a look at how you specify contracts, for example). If you like functional programming, you'll love CoffeeScript:

  ['fizz' unless i%3] + ['buzz' unless i%5] or i for i in [1..100]  
(fizzbuzz one-liner from http://ricardo.cc/2011/06/02/10-CoffeeScript-One-Liners-to-I...)
That one-liner is awesome! But it also has some evil type conversions in the form of <array> + <array> = <string> hehe
Agreed that var hoisting can be tricky before you encounter a situation where it break something. (I suspect this happens to most JS devs at some point. Certainly has to me!)

However, what's wrong with not having types? Sounds like you're just not a fan of dynamic languages since this isn't a JS-specific issue.

I am a fan of typeless languages for small project and build files. But js takes the cake because it doesn't even distinguish between ints and floats.
Also no types means no type completion and no refactoring.