News for hackers. Stuff that matters.
Re:JavaScript as default language and software stack by mercurial on Thursday September 24, 2015 @02:07PM (#10273382)
It's a matter of opinion. If you get used to strongly typed languages, the idea of having your entire application in something barely typed like Javascript feels horrifying. I may be able to tolerate Javascript-with-a-typesystem (for instance, typescript), but raw JS? I don't see why you'd ever want to do that.
Re:JavaScript as default language and software stack by mizzao on Thursday September 24, 2015 @02:10PM (#10273411)
I think you just solved your own problem.
Re:JavaScript as default language and software stack by octaveguin on Thursday September 24, 2015 @02:27PM (#10273554)
TypeScript has a lot of holes.

What I'd like is a language I can use that has optional typing where all the libraries follow a strict type system but the application I put on top of it doesn't care.

That is the exact opposite of what I get with TypeScript. I'm left with a lot of dynamic mess libraries that I build my typed application on top of.

Steel on top of jello.

Re:JavaScript as default language and software stack by zaczac on Thursday September 24, 2015 @02:45PM (#10273689)
if javascript is ok to be primary language, why choose another wrapper language to make it feasible? it is totally a disaster design in Javascript and the wrapper language should not bail out Javascript. Instead, just let javascript die.
Re:JavaScript as default language and software stack by smacktoward on Thursday September 24, 2015 @02:16PM (#10273471)
I think part of the author's point is that JS has now achieved so much critical mass, so to speak, that in the not too distant future it's just going to be the programming language. Being a programmer will be synonymous with writing JavaScript. So it doesn't really matter how you feel about JS per se; it's the language all the tooling will be built around, it's the language young programmers will have learned in school, it's the language that the people who cut the checks will assume by default you'll be using. So justifying using anything else will be an increasingly difficult uphill struggle as you fight against all these factors.
Re:JavaScript as default language and software stack by s_kilk on Thursday September 24, 2015 @02:36PM (#10273619)
> that in the not too distant future it's just going to be the programming language. Being a programmer will be synonymous with writing JavaScript.

chortle

Not so long ago they were saying the same about Ruby, and Java before that, and so on down a long and winding history of ludicrous one-language-swallows-the-world predictions.

Re:JavaScript as default language and software stack by Touche on Thursday September 24, 2015 @02:47PM (#10273709)
> Not so long ago they were saying the same about Ruby, and Java before that, and so on down a long and winding history of ludicrous one-language-swallows-the-world predictions.

In this case it's not so much a prediction as an observation of what has already been happening.

Re:JavaScript as default language and software stack by noir_lord on Thursday September 24, 2015 @02:51PM (#10273741)
There is a language that has largely taken over the "not compiled" segment but it's not JavaScript it's python.

It's everywhere at this point.

Re:JavaScript as default language and software stack by Touche on Thursday September 24, 2015 @03:35PM (#10274071)
It's not in my browser. It's not in Nginx. It's not not in my database (Couch). JavaScript is.
Re:JavaScript as default language and software stack by s_kilk on Thursday September 24, 2015 @04:36PM (#10274524)
It might be hard to believe, but the browser is not the be-all and end-all of software.

I'm starting to think theres a JS Bubble forming, inside which people who only ever touch JS and nothing else proclaim that the world and the moon are made entirely of JavaScript.

Re:JavaScript as default language and software stack by rjbwork on Thursday September 24, 2015 @02:22PM (#10273516)
Which will be the day I leave the field. It's okay to toy around with, and decent for some DSL type things, but I think it an absolutely insane proposition to write a few million line codebase exclusively in JavaScript, especially when dealing with sensitive data, complex data structures, and complicated algorithms.
Re:JavaScript as default language and software stack by vezzy-fnord on Thursday September 24, 2015 @02:27PM (#10273548)
Being a programmer will be synonymous with writing JavaScript.

I think you should start laying off HN, in all honesty.

Re:JavaScript as default language and software stack by smacktoward on Thursday September 24, 2015 @02:34PM (#10273609)
Duly noted!
Re:JavaScript as default language and software stack by jsprogrammer on Thursday September 24, 2015 @02:11PM (#10273419)
I believe there is already work on type inferers and static analyzers.

Stripped down, functional C with type inference? Yes, please.

Re:JavaScript as default language and software stack by Drup on Thursday September 24, 2015 @02:19PM (#10273491)
How about a language that is not shit instead ?

Javascript is the C++ of web dev. You bolt a ton of things on top of a shitty language and you hope to obtain a slice of it that is decent in the long run. Except it's still going to be full of terrible quirks and 30 ways to shoot yourself.

I'm sorry, but I don't want this future for programming.

Re:JavaScript as default language and software stack by mercurial on Thursday September 24, 2015 @02:41PM (#10273664)
C++ wouldn't have been the first thing I'd compare JS to. Visual Basic, maybe?

But yeah, if you absolutely want a dynamic language, you have much saner choices with a considerably more robust ecosystem (hello Python).

> I'm sorry, but I don't want this future for programming.

I don't want this present either :)

Re:JavaScript as default language and software stack by Touche on Thursday September 24, 2015 @02:37PM (#10273631)
One thing JavaScript gets very right is first-class functions. There's nothing bolt-on about those. It makes it very easy to tolerate warts (which don't come up often anyways).
Re:JavaScript as default language and software stack by douche on Thursday September 24, 2015 @02:40PM (#10273658)
Piss poor string handling functions out of the box?

Shitty date/time implementations (unless you're using moment)

Callback hell?

That's just my list for this morning.

Re:JavaScript as default language and software stack by Touche on Thursday September 24, 2015 @02:45PM (#10273690)
> Piss poor string handling functions out of the box?

Don't know what you mean by this. As for the other things; like I said, getting first class functions right makes those other things unimportant. Are you running into the problems with DateTime that often? I can't even remember what those problems are. I don't doubt they exist, but I think you're over-inflating the importance.

Re:JavaScript as default language and software stack by Drup on Thursday September 24, 2015 @05:33PM (#10274919)
They are not "very right" due to all the scoping weirdness and the late binding semantic.
Re:JavaScript as default language and software stack by vans on Thursday September 24, 2015 @04:36PM (#10274522)
You are so right !
Re:JavaScript as default language and software stack by kaendfinger on Thursday September 24, 2015 @02:15PM (#10273458)
All of which are going to be mediocre because JavaScript is a very hard language to simply reason about for machines.
Re:JavaScript as default language and software stack by jsprogrammer on Thursday September 24, 2015 @02:19PM (#10273494)
The language is not fixed, further, tools do not need to support every feature.
Re:JavaScript as default language and software stack by kaendfinger on Thursday September 24, 2015 @02:22PM (#10273515)
Here's the thing, JavaScript as it is (specifically ES5, a little bit less so with ES6, but even then, still an issue) is too dynamic to reason about very well, especially when using large libraries that do crazy things. Yes, it can be changed to be easier to reason about, but the fundamental issue I see is that too many people are using the very dynamic features of JavaScript.
Re:JavaScript as default language and software stack by derefr on Thursday September 24, 2015 @02:56PM (#10273771)
Javascript could be versioned. If Javascript is changed to be more static and less "forgiving", browsers could ship with one engine to run legacy ES6 code and another to run new code.