Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As far as JavaScript goes he's not off the mark. The thing that saddens me a bit is that it's yet another post about a particular language/technology/thing.

No language/technology/thing is better than another. It may be better than another in a particular context. This is as true for Android as it is for Visual Basic and Arduino.

While this is obviously my personal opinion, I think the industry as a whole might benefit a lot more from a post that discusses the pros and cons of building a solution that targets say, the web, a phone, tablet and a desktop. And how such a solution might do authN and authR, synchronise data using store/forward, work in an offline scenario (aeroplane, underground, Gobi desert...).

Talking about specific technologies in such a context is useful. It is even more useful when considering environmental factors such directories, monitoring software, privacy, advertising and so on.



No language/technology/thing is better than another. It may be better than another in a particular context.

I don't really buy into this reasoning. If a given language is worse than every other in almost every context (the "global" context, if you will), then it's clearly an inferior language relative to the others.

JavaScript does exhibit this. It has exactly one thing going for it: it's the only scripting language widely available in web browsers.

Aside from that, it's inferior to most other languages in almost every respect. Its syntax is mediocre. Its semantics are inconsistent and often outright confusing. It's missing critical features that are essential for anything but the smallest-scale development. Its performance is only just somewhat poor today, due to a huge amount of effort from Google and others, otherwise it was downright abysmal in its early implementations. Its libraries are more bandages for its numerous problems, rather than tools that empower developers. The supporting tooling is quite bad (Chrome's developer tools or Firebug don't compare to a real debugger, for instance). The community leaves a lot to be desired, especially given the high amount of ignorance and the extremely bad "advice" that is passed around so often by its members.

We shouldn't be politically correct when it comes to technology. Some programming languages are worse than others, and we shouldn't shy away from saying this. JavaScript is an inferior language, like it or not.


> JavaScript does exhibit this. It has exactly one thing going for it: it's the only scripting language widely available in web browsers.

Other things it has going for it:

- a proper universal unicode-aware string type. Languages which lack this: C, PHP. (Note that i said universal, obviously you can do proper string handling in any language, some just make it a bit too hard.)

- low verbosity and a general lack of boilerplate. Languages which lack this: Java, C++. (Yes, you can write concise code in these languages, it's just that in practice nobody does.)

- Prototypal inheritance. Admittedy, many people consider this a disadvantage, but that's because they were introduced to the inferior classical inheritance model first.

- Everything is an object, always. Languages which lack this: practically every mainstream language out there. Combine this with prototypal inheritance, and it makes javascript the most object-oriented language i know by letting you inherit from almost anything.

- A syntax so expressive it can be easily adapted to do dynamic scoping and namespacing (see crockford's book) without actually needing a namespace syntactical element, which makes it possible to scale it up to hundreds of thousands of lines of code. (The DOM is a different matter, but a different language would feel the pain of scaling that up just as much.)

So, really, worse is in the eye of the beholder. Javascript is different, not worse. Are you sure you've given it a fair chance and aren't just rejecting it for weak typing and the horribleness that is the DOM?

(Btw, you should try a proper IDE like webstorm that has a full debugger for javascript before saying the tooling isn't there yet.)


It's missing critical features that are essential for anything but the smallest-scale development.

What in your opinion is smallest-scale development? Millions of users using your application each year? Do we need web apps to support billions of users each year now?

JavaScript is the most superior scripting language widely available in web browsers. Until there is an alternative it cannot be an inferior language because there is nothing equivalent on which to base a comparison.


I was talking about code base and application size, not so much the number of users.

Using JavaScript for a large application is not a pleasant experience. I know there are a lot of JavaScript developers out there who have never used anything but JavaScript, and maybe PHP, so they don't know what they're missing. But those of us who have used even just C++, Java, C#, or Delphi will know how critical things like static typing, namespaces, proper modularity and class-based OO, for example, are.


Thank you, you put it better than I was able to!


Aside from that, it's inferior to most other languages in almost every respect.

Your perspective is semantic. Mine is pragmatic. I want to get a job done, and I want to be successful. I have no interest in the best tool.

If I'm targeting web browsers then JavaScript is the logical choice that will make me successful. It doesn't matter that it's a swamp donkey.

JS libraries are like any other library. The developer makes the choice. I wouldn't, for instance, distribute the Windows Phone toolkit with my app when all I'm using from the toolkit is the ExpanderView control.


Hear, hear!

It has exactly one thing going for it: it's the only scripting language widely available in web browsers.

Please let us change this. We are marching into the future heady with ambition and the common tool is JavaScript. This is a sad state of affairs.


Its syntax is mediocre.

I would agree if you said language X is more expressive than Y, it can be proved. But isn't syntax totally subjective?

Missing critical features

Which critical features are missing?

Performance .. absymal

Well .. you would not notice any performance issues with typical web apps. You should try it.

Libraries are missing, are more bandages for its numerous problems

Github has an enormous collection of nodejs libraries. Which ones are bandages for language problems?

Tooling

I find text-editors and chrome better than IDEs like Eclipse and Visual Studio.


JavaScript is the only mainstream programming language that has multiple competing production-quality implementations.

I think this rarity helps to ensure that work is done to improve the runtime, from both an ease-of-development and a performance perspective, while also keeping the set of what works pretty stable.


That's nonsense.

There are numerous competing, production-quality, independently-developed C compilers, runtimes and standard libraries.

There are numerous competing, production-quality, independently-developed C++ compilers, runtimes and standard libraries.

There are several competing, production-quality, independently-developed Ada compiler systems.

There are numerous competing, production-quality, independently-developed Fortran compiler systems.

JavaScript is hardly alone in that respect.


Ah, I think when I usually make that claim I include the qualifier "high-level".

Obviously, without that qualifier the statement is false.


I'd say Mono/Xamarin and .NET/Microsoft would qualify as competing production quality implementations of C#. Xamarin may have positioned their implementation of C# to target the mobile space instead of the enterprise space because they see that as a losing battle against Microsoft (and the niche they do address is very lucrative right now) but the could still qualify as competitors.


>No language/technology/thing is better than another. It may be better than another in a particular context. This is as true for Android as it is for Visual Basic and Arduino.

Disagree, strongly. Progress exists. The languages of today really are better than the languages of 20 years ago. Android really is better than winCE (and this is speaking as someone who was a fan of winCE when it was the best thing available, and spent a fair amount of effort compiling apps for it), not just in some situations but overall.


winCE today is far superior to Android when creating an app that relies on Active Directory.

Similarly, whilst LINQ may represent progress in that it makes querying XML, an object model or SQL Server easier, it's terrible when the requirement calls for a complex data model that bears little resemblance to the in-memory representation required by the app.

That's what I mean by context.


If you look at the definition of "good" in Noah Webster's American Dictionary of the English Language, it will say "fit for a particular purpose" to say that nothing is any better than anything else is to ignore purposes.




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

Search: