News for hackers. Stuff that matters.
Re:JavaScript: The Modern Parts by lol768 on Saturday August 24, 2019 @05:43AM (#20786230)
>Whereas Java and C users may still have debates about where, exactly, open source projects should publish their releases, that issue is settled in the JavaScript community

I thought Maven Central was pretty much the canonical answer in Java land. Nobody cares what tool you actually use to pull these down (SBT, Gradle, Maven..).

>What this means, however, is that to do JavaScript development “The Modern Way”, while adopting its new features, you simply must use a local transpiler toolchain

Surely this depends on the browsers your application is targeting? And presumably, the sort of feature you're using (can it be polyfilled or is it a syntax feature?).

>In 2018-2019, several things have changed about the JavaScript community. Development tools are no longer fledgling, but are, instead, mature. There are built-in development tools in all of Safari, Firefox, and Chrome browsers

I agree they're decent, but there are still cases where they struggle - particularly after code has been transpiled. I still run into issues these days where the browser is trying to show a source-mapped JS file instead of the actual bundle code which masks a real issue.

>And, for web frontends, it’s your only choice

https://caniuse.com/#search=webassembly

If you don't care about IE11 (or you polyfill), it's hardly your only choice. wasm is still far from perfect but there's no question you can start writing some logic in languages other than JavaScript, and interoperate.

>If you’re the kind of programmer who thinks, “I code in Python/Java/Ruby/C/whatever, and thus I have no use for JavaScript and don’t need to know anything about it”, you’re wrong, and I’ll describe why. Incidentally, you were right in 1998, you could get by without it in 2008, and you are dead wrong in 2018.

>To be a serious programmer, you’ll have to know JavaScript’s Modern and Good Parts — as well as some other server-side language, like Python, Ruby, Go, Elixir, Clojure, Java, and so on

This reads to me as downright patronising to e.g. embedded software engineers who might be writing hardware drivers in C/C++ day to day.

Perhaps this should read "to be a serious web developer with front-end responsibilities" (JavaScript is sufficient, not necessary on the back-end and - of course, subjectively - there are much better choices to use).

Re:JavaScript: The Modern Parts by richardwhiuk on Saturday August 24, 2019 @09:47AM (#20787106)
There's a bizarre, naive belief that all programming is web programming.

It's patronising and inaccurate, but it's common among people who think Javascript is a serious language.

Re:JavaScript: The Modern Parts by paulryanrogers on Saturday August 24, 2019 @10:23AM (#20787281)
Not sure who those people are. But I've programmed precessionally in C, C++, Java, and PHP; and I'd say JavaScript is the most seriously intense. Doing anything useful with it requires knowing so much more than just the language part: libraries, platform (browser, server, Electron, etc.), and the company's preferred tooling/frameworks.
Re:JavaScript: The Modern Parts by giancarlostoro on Saturday August 24, 2019 @12:17PM (#20787984)
Even with just vanilla JS it can get a bit confusing sometimes. I usually spend a lot of time reading MDN when working with JS just to see if I am missing anything obvious.
Re:JavaScript: The Modern Parts by dreamcompiler on Saturday August 24, 2019 @12:25PM (#20788032)
Javascript is a frustrating language. On the one hand it's more "serious" than [legacy] C, C++, Java, and Python because it had first-class functions and real lexical closures from day one.

On the other, it had imprecise typing, no multiprocessing, and no access to the file system. Some of that has been fixed, but Javascript was designed by one person in a week to script web browsers and that's still painfully obvious.

Re:JavaScript: The Modern Parts by Skunkleton on Saturday August 24, 2019 @03:01PM (#20789032)
> On the one hand it's more "serious" than [legacy] C, C++, Java, and Python because it had first-class functions and real lexical closures from day one.

Why do closures make a language "serious"? To me languages are just languages. Seriousness is defined the problem you are solving. Are flight controls serious? Probably. Is yet another small scale CRUD app serious? Probably not.

There is a lot of "serious" code written in every major language. There is a huge amount of "serious" code written in C and C++, and all of this without first class functions or lexical closures.

Re:JavaScript: The Modern Parts by dreamcompiler on Saturday August 24, 2019 @04:55PM (#20789655)
Good question. I'll try to give my answer, but others will have their own opinions. Computer languages move in the direction of supporting "good ideas" as those ideas become generally recognized as being good. Usually those ideas start in academia and gradually find their way to industry. Some examples: Structured ("goto-less") programming, object-oriented programming, automatic memory management, strong typing, lexical closures, first-class functions, functional programming, automatic bounds checking, and prevention of memory ownership violations.

A "serious" language is indeed partially defined by its fitness for the stated job at hand, but also for how well it handles the often unstated requirements of productivity, security, maintainability, and robustness in the face of likely future needs. Languages that have more of the above features tend to do better at these unstated requirements.

What is and isn't a "serious" language can change over time depending on what we learn is important. C was a serious language for a while, but it has not been one for a couple of decades because of its non-support of anything remotely resembling security. C is still used because of its extreme portability, but it probably should be abandoned.

Conversely, languages that support first-class functions, lexical closures, and automatic memory management are now in the serious category because those things present huge improvements in productivity, maintainability, and robustness in the face of future changes. (I'll even go out on a longer limb and say that programmers who learn to think in terms of functional composition become more productive coders in any language.) Pure O-O languages are beginning to move in the non-serious direction because they cannot be readily parallelized in an era when parallel computing is the only way forward now that Moore's law is dead.

Javascript anticipated a couple of these features before other mainstream languages, and now it's moving beyond web browsers. So yeah, with some reservations I'd call it serious.

Nowadays I'd never write major code in a language that doesn't directly support most of the "serious" features I listed above; it would be too much of a hit to my productivity. It would feel like building a house with a hammer and nails when nailguns were readily available.

If I were writing embedded apps like flight controls today, I'd use Lisp for the high-level parts and Rust and maybe a bit of assembler for the low level parts.

Re:JavaScript: The Modern Parts by Skunkleton on Monday August 26, 2019 @04:31PM (#20803459)
I find the idea of viewing a language as "serious" to be fundamentally flawed. Every project has a set of requirements and constraints. Usually the pragmatic language choice is dictated by external factors. Things like library support, developer expertise, and tool maturity are much bigger factors for most businesses.

The "serious" professional choice for my company (an OS vendor, with a focus on certifiable systems) is currently C. The tooling we use is for C, the expertise within my company is in C, and the industry that we work with understands and expects C.

At some point, the operating systems industry will transition to more modern languages. Rust is promising, but it is a long way from being a serious consideration for FAA certifiable projects.

Re:JavaScript: The Modern Parts by stefan_ on Saturday August 24, 2019 @04:44PM (#20789594)
It is such a "serious" language that it has only floating point numbers. I think you will find it is not fit for serious work.
Re:JavaScript: The Modern Parts by richardwhiuk on Monday August 26, 2019 @09:14AM (#20799587)
Java has closures and has had since node was released.

Same for C++.

Javas functions aren't first class, but only to the extent that there's some syntactic sugar.

Re:JavaScript: The Modern Parts by stefan_ on Saturday August 24, 2019 @01:17PM (#20788378)
It's the same kind of people that describe themselves as "full stack" because they made JavaScript in the browser talk to JavaScript on the server, the latter running in some kind of heroku auto-container magic.
Re:JavaScript: The Modern Parts by vedantroy on Saturday August 24, 2019 @01:55PM (#20788595)
"It's common among people who think Javascript is a serious language".

I can't tell if you think JS is not a serious programming language.

Re:JavaScript: The Modern Parts by WilliamEdward on Saturday August 24, 2019 @07:18AM (#20786524)
Thanks for bringing attention to WebAssembly, far from perfect but with time it could rise to become the default for front ends. Javascript's popularity was purely accidental and doesn't have to be the only option for in-built browser applications.
Re:JavaScript: The Modern Parts by giancarlostoro on Saturday August 24, 2019 @12:18PM (#20787992)
I tell people WASM is great but still not quite ready just yet. I think we will start to see amazing things. Even Microsofts Blazor is impresive. I cant wait to see what Python and other projects come up with in regards to WASM.