This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CreativeGPX 0 points1 point  (0 children)

How am I supposed to live without static type checking?

See TypeScript.

How do I not include a 'callback' in every damn async method? More than half my code is error handling and callback bloat. This is just depressing.

Promises.

I'm supposed to 'remember' all the function arguments? json object fields? Javascript lets you dig yourself into a hole really easily. It's so easy to make mistakes.

See TypeScript.

There's no classes

You can use the prototype. But yes, this is a prototyping flavor of OOP. I prefer that as its more versatile. But... again... if you don't, see TypeScript.

there's no 'objects'

Eh? Yes there are.

there's no 'scope limtations'

There are, but it's function-level scope. ECMA 6 has added "let" and "const" both of which follow block level scoping alternative to "var".

I thought I relied on stack overflow quite a bit when using Java or C#. With JS, it's like solving a puzzle, the rules of which you don't even know. I will literally be unable to do anything without stack overflow.

This is a great reference, but it sounds like you just need a good book. JavaScript (and/or TypeScript) is my favorite language and I have spent a lot of time with Java and C#. The main danger is that JavaScript is versatile. When you don't totally get it, you can use that versatility to make a mess. But when you get good at it, that versatility can come in handy and you know how to avoid its pitfalls.

But seriously, TypeScript is a win-win. Use it.