News for hackers. Stuff that matters.
Re:For modern development, Javascript is just something you ... by jpgvm on Tuesday October 29, 2013 @09:40AM (#6633944)
I'm sorry but I have to side with the JS is utter crap crowd.

The single redeeming feature of JS is that it's implemented in all current browsers. If it wasn't for that fact I doubt anyone would have cared much.

It's just nowhere near as good as current alternatives for application development. Everything it can do another language can do better, except run in a browser - which is entirely out of control of the other languages so somewhat of a moot point.

Re:For modern development, Javascript is just something you ... by DougWebb on Tuesday October 29, 2013 @10:12AM (#6634204)
I'm sorry but I have to side with the "oxygen is utter crap" crowd. It's too reactive, causing all kinds of materials to degrade, and sometimes they even burst into flame! Helium, Neon, Argon are much better, but even Nitrogen, which isn't perfect, is better than Oxygen.

The single redeeming feature of Oxygen is that it's pretty much everywhere, and yeah sure we can all breathe it and don't have any other choices for gases to breathe. If it wasn't for that fact I doubt anyone would care much for it.

Ok, I'm paraphrasing and extending what you said to make my point... Javascript being in every browser, to the exclusion of all other languages, is a huge factor in its popularity and utility, and it's the main driving force towards improving the language. If Javascript didn't become the in-browser language, it probably wouldn't have existed at all. Instead we'd have some other small language with similar design flaws, or maybe Perl would have been adopted as the in-browser language. At the time it was the main language for server-side web development, it was already embeddable and used for in-app scripting (like Lua is today), and I recall a browser extension for Netscape that let you use it instead of Javascript. IE, of course, would only have had VBScript.

Pick your poison.

Re:For modern development, Javascript is just something you ... by candydance on Tuesday October 29, 2013 @10:44AM (#6634458)
I didn't see a point, just a bunch of facts and a smarmy, self-righteous turn-about comment. If I could downvote it, I would.

The parent comment said "Javascript is a bad language but it's incredibly useful because it's in every browser." and you just agreed with him after writing a bunch of sarcastic drek.

Re:For modern development, Javascript is just something you ... by DougWebb on Tuesday October 29, 2013 @12:02PM (#6635132)
No, jpgvm said that Javascript is "utter crap" that no one would care about if not for the fact that it's implemented in all current browsers. She/he never said anything about it being useful. My point, which appears to have gone over your head, is that you can't dismiss one of the key aspects of Javascript's value and then call it "utter crap".
Re:For modern development, Javascript is just something you ... by candydance on Tuesday October 29, 2013 @12:26PM (#6635367)
Uh, no. He specifically mentioned that running in the browser is why JS is so widely used, even though the language itself is worse than alternatives.

>The single redeeming feature of JS is that it's implemented in all current browsers. If it wasn't for that fact I doubt anyone would have cared much.

>Everything it can do another language can do better, except run in a browser

That's the exact opposite of dismissing a key aspect of Javascript's value, that's explicitly acknowledging it.

Re:For modern development, Javascript is just something you ... by kelvin0 on Tuesday October 29, 2013 @11:17AM (#6634722)
You need oxygen to live. I doubt javascript is essential to most the IT 'ecosystem'.
Re:For modern development, Javascript is just something you ... by tracker1 on Tuesday October 29, 2013 @12:37PM (#6635500)
Unless your IT 'ecosystem' doesn't include any web based applications, I'm pretty sure it does need JavaScript.
Re:For modern development, Javascript is just something you ... by Touche on Tuesday October 29, 2013 @10:18AM (#6634250)
I'm not aware of any other language that makes it so easy to write your code in either a functional or object oriented style. It doesn't do either perfectly, but it gets you a good 85% of the way there for both. Good enough that advocates of a particular style are able to write and enjoy writing JavaScript. I can't think of any other language that has that level of flexibility. Can you?
Re:For modern development, Javascript is just something you ... by oscargrouch on Tuesday October 29, 2013 @10:33AM (#6634371)
>I'm not aware of any other language that makes it so easy to write your code in either a functional or object oriented style

>I can't think of any other language that has that level of flexibility. Can you?

(Subjective opinion here)- I think Lua got it better; you can create a better object oriented program with it, as you can do it with functional style; Ending with a more elegant final source code down the road

Re:For modern development, Javascript is just something you ... by Touche on Tuesday October 29, 2013 @10:43AM (#6634457)
Yeah, agree Lua did get it better. JavaScript is very much inspired by Lua, but has the disadvantage of having more "cooks in the kitchen" wanting to mess with it.
Re:For modern development, Javascript is just something you ... by lucian1900 on Tuesday October 29, 2013 @10:52AM (#6634521)
Ruby, Python, Clojure, Scheme, Lua, even Scala. All better than JavaScript in most ways.
Re:For modern development, Javascript is just something you ... by collyw on Tuesday October 29, 2013 @11:23AM (#6634771)
Perl! How could you leave that out!
Re:For modern development, Javascript is just something you ... by lucian1900 on Thursday October 31, 2013 @05:28AM (#6645882)
True. Regardless of how disturbing I find it, Perl does qualify.
Re:For modern development, Javascript is just something you ... by tel on Tuesday October 29, 2013 @11:03AM (#6634619)
I think it's inarguable that Ruby and especially Python are somewhat inhospitable to functional programming as compared to the rest of that list.
Re:For modern development, Javascript is just something you ... by lucian1900 on Tuesday October 29, 2013 @11:20AM (#6634744)
No less hospitable than JavaScript, which was my point.
Re:For modern development, Javascript is just something you ... by tel on Tuesday October 29, 2013 @12:18PM (#6635277)
I disagree strongly w.r.t. Python as anonymous lambdas are heavily restricted there. I disagree less strongly but also somewhat insistently about Ruby where the distinction between methods and functions is warranted but thus involves more overhead.
Re:For modern development, Javascript is just something you ... by lucian1900 on Thursday October 31, 2013 @05:25AM (#6645876)
Having to use "def" isn't the end of the world. You often end up naming your lambdas in a let in scheme anyway.
Re:For modern development, Javascript is just something you ... by Touche on Tuesday October 29, 2013 @12:11PM (#6635227)
JavaScript is hospitable enough that you see entire applications written in a functional style. Where is the Python and Ruby applications written mostly in a functional style? I've never seen any.
Re:For modern development, Javascript is just something you ... by lucian1900 on Thursday October 31, 2013 @05:27AM (#6645880)
I've yet to see entire JavaScript applications written in a functional style. Just because "map" is used more often than Python doesn't make it functional.
Re:For modern development, Javascript is just something you ... by tel on Thursday October 31, 2013 @12:18PM (#6647687)
I'd agree with this point. I don't think Python, Ruby, or Javascript are particularly "functional", whatever that means.
Re:For modern development, Javascript is just something you ... by Touche on Tuesday October 29, 2013 @11:05AM (#6634638)
Better at being both a functional and object oriented language?
Re:For modern development, Javascript is just something you ... by dragonwriter on Tuesday October 29, 2013 @12:23PM (#6635338)
> Better at being both a functional and object oriented language?

Well that's both subjective and ambiguous (subjective in the evaluation of quality in each area, and ambiguous because the meaning of "better at a and b" can be interpreted in a number of ways, such as max by min(a,b), max by average(a,b), etc.

But, given that, I'd say that several of the listed languages are better at "being both a functional and object oriented language" than JavaScript, including Scala and Ruby.

Re:For modern development, Javascript is just something you ... by Touche on Tuesday October 29, 2013 @12:35PM (#6635472)
So where's all the functional Ruby code? I've never seen any.
Re:For modern development, Javascript is just something you ... by dragonwriter on Tuesday October 29, 2013 @01:31PM (#6635940)
> So where's all the functional Ruby code?

All over. Various functional approaches are basic core Ruby programming techniques.

Its not a great FP language because it lacks functional purity (like most Lisps, and, more to the immediate point, like JS) and the main Ruby implementations lack TCO (as, again, do many Lisps and, again, JS.)

But there's certainly a lot Ruby code using functional style.

Re:For modern development, Javascript is just something you ... by lucian1900 on Tuesday October 29, 2013 @11:20AM (#6634741)
Better than JavaScript anyway, pretty much all of them.
Re:For modern development, Javascript is just something you ... by Touche on Tuesday October 29, 2013 @12:09PM (#6635207)
I didn't ask which are "better", I asked which are better at being both functional and object oriented at the same time. I can accept Lua, but the others I really need a good argument for.
Re:For modern development, Javascript is just something you ... by lucian1900 on Thursday October 31, 2013 @05:26AM (#6645877)
They are all better at both than JavaScript. There is no feature that JavaScript has that the other languages don't, often in very similar shapes. The reverse is mostly not true.
Re:For modern development, Javascript is just something you ... by angersock on Tuesday October 29, 2013 @12:10PM (#6635218)
Javascript is reliably second or third place to all of those mentioned, so it trumps.

Worse is better, sorry.

Re:For modern development, Javascript is just something you ... by CmonDev on Tuesday October 29, 2013 @09:52AM (#6634022)
Being a non-JVM developer I can see that e.g. Scala is actually trying to innovate, trying to combine best features and learn from past mistakes. But it just grinds my gears when modern JS is represented as some sort of "innovation". How can so called "Open Web" be open if the only realistic option I have is JS+HTML or something that will be painful to debug in a real world job.