News for hackers. Stuff that matters.
Re:There's no good reason to use Nodejs by tchaffee on Friday May 12, 2017 @06:00AM (#14322645)
What if I want to use the same language on both client and server?
Re:There's no good reason to use Nodejs by ptx on Friday May 12, 2017 @06:15AM (#14322709)
Kotlin! :) Which incidentally added coroutines and async/await in the recently released version 1.1.

Server-side (running on the JVM): http://kotlinlang.org/docs/reference/server-overview.html

Compiling to JavaScript for the client side: http://kotlinlang.org/docs/reference/js-overview.html

...and for the Android client, compiling to Java bytecode, using the regular Java-based Android APIs and SDK: http://kotlinlang.org/docs/reference/android-overview.html

For iOS and other targets where you don't want the Java or JS runtimes, native compilation via LLVM is in the works: https://github.com/JetBrains/kotlin-native/

Re:There's no good reason to use Nodejs by octohedron on Friday May 12, 2017 @06:01AM (#14322652)
Might be a good idea to start using PHP as a browser scripting language then
Re:There's no good reason to use Nodejs by cryptarch on Friday May 12, 2017 @06:03AM (#14322660)
Rust has a WebAssembly backend :-)

All we need a web framework written in Rust which includes the generation of client-side code.

Paired with incremental compiles (yet to land in stable AFAIK) that should be pretty awesome.

Edit: nose

Re:There's no good reason to use Nodejs by arethuza on Friday May 12, 2017 @06:05AM (#14322667)
A very long time ago (1994) I did hack Mosaic about to use Perl as a a client side scripting language... :-)
Re:There's no good reason to use Nodejs by justinclift on Friday May 12, 2017 @06:04AM (#14322663)
Dart should take care of that:

https://www.dartlang.org

Note - Haven't tried it yet, but it's on my ToDo list. ;)

Re:There's no good reason to use Nodejs by nimmer on Friday May 12, 2017 @06:08AM (#14322675)
Various languages can generate server-side code and javascript. Since you asked, Nim generates C, JS and more: https://nim-lang.org/
Re:There's no good reason to use Nodejs by justinw2 on Friday May 12, 2017 @06:06AM (#14322673)
You could also use Purescript, even sharing the same modules between the frontend and backend.