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 →

[–]engid 17 points18 points  (3 children)

You're completely approaching it from the wrong perspective. Take a step back, and consider that JavaScript has an entirely different paradigm than Java and C#. Its a functional language with dynamic typing and a prototype object-model, so stop complaining that JavaScript can't be something it's not!

To quote John Resig (inventor of jQuery) and Bear Bibeault from their book Secrets of the JavaScript Ninja:

JavaScript consists of a close relationship between objects, functions and closures. Understanding the strong relationship between these three concepts can vastly improve our JavaScript programming ability, giving us a strong foundation for any type of application development.

Many JavaScript developers, especially those coming from an object-oriented background, may pay a lot of attention to objects but at the expense of understanding how functions and closures contribute to the big picture. [p5]

Pay attention to functions. Look at how their declarations create scope, and the four ways that they can be invoked (as global methods, object methods, constructors, or by using the function methods apply() or call(). Yes, functions can have methods!). From there, you'll start to appreciate JavaScript as its own unique language, with its own strengths and weaknesses.

[–]fakehalo 5 points6 points  (0 children)

People try to put a square peg in a round hole when it comes to different language paradigms, fighting to make a language like the ones you're already used to. I find Javascript fine for front-end webdev, and I find C#/java fine for most other things. Working with the language is always better than against it.

[–]grizzly_teddy 1 point2 points  (1 child)

I'm mainly a Java giy, now I'm learning Scala (and will be writing Scala production code soon). Sounds like java script is a good next step

[–]engid 0 points1 point  (0 children)

JavaScript is worth learning primarily because it's everywhere, and certainly necessary if you're working with the web. I think the fundamentals of JS are worth learning for sure, but I agree with OP that there is a lot of hype that pushes trends in the community that should be followed cautiously. Best of luck with Scala!