3 ms·
What if I want to use the same language on both client and server?
by tchaffee 9y ago
What if I want to use the same language on both client and server?
- octohedron 9y agoMight be a good idea to start using PHP as a browser scripting language then
- cryptarch 9y agoRust 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
- arethuza 9y agoA very long time ago (1994) I did hack Mosaic about to use Perl as a a client side scripting language... :-)
- justinclift 9y agoDart should take care of that: https://www.dartlang.org https://www.dartlang.org Note - Haven't tried it yet, but it's on my ToDo list. ;)
- justinw2 9y agoYou could also use Purescript, even sharing the same modules between the frontend and backend.
- nimmer 9y agoVarious languages can generate server-side code and javascript. Since you asked, Nim generates C, JS and more: https://nim-lang.org/ https://nim-lang.org/
- ptx 9y agoKotlin! :) 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 http://kotlinlang.org/docs/reference/server-overview.html Compiling to JavaScript for the client side: http://kotlinlang.org/docs/reference/js-overview.html 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 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/ https://github.com/JetBrains/kotlin-native/