4 ms·
I've been looking for this for a long while. I am surprised that there are no browsers that can support other languages. My ideal architecture is to have a bro
by ivanmontillam 5y ago
I've been looking for this for a long while.
I am surprised that there are no browsers that can support other languages. My ideal architecture is to have a browser where you can select your front-end language interpreter, as in a Chromium + V8 + CPython + Whatever front-end processor you might want (Brython[0] achieves this, but transpiling to JavaScript).
What doesn't make sense to me is that JavaScript has genuinely been the only language for the front-end, and it has been a monopoly for many years. Of course, there are other great languages like TypeScript, but these end up anyway transpiled to JavaScript, which to me feels like mounting your skyscraper over dunes. Not to hate on JavaScript, but JavaScript has grown too quirky for my tastes and that's why I've been away a lot from front-end development.
There are efforts to fix it, with the new ECMA standards, but I don't feel it's going anywhere unless breaking changes are introduced to modernize the language. The fact that you have to "patch" your scripts with 'strict mode' on the top of the file speaks a lot of being defensive with programming.
WASM is a solution to this, except you're not supposed to write WASM yourself. I want web development to be more straightforward, like the old days, where you didn't have to "compile" or "package" anything, and you just did your thing, and that worked.
--
[0]: https://brython.info/ https://brython.info/
- ihateolives 5y agoI'm really sad that Dart didn't make it as Javascript replacement. It's much better designed language, but didn't get traction.
- BoorishBears 5y agoDart is not fhat much better. In a period where most languages are experiencing a "rebirth" as a well thought out modern language, Dart feels like the "before" waiting for an "after". I'd be deeply disappointed if we had progressed from Js to Dart, and it's why I'm not a fan of Flutter (Java => Kotlin, Obj C => Swift, Js => Ts, Erlang => Elixr, etc.)
- pjmlp 5y ago> Java => Kotlin, If you are speaking of Android, yes. On the JVM is it just one more guest on the building. https://madnight.github.io/githut/#/pull_requests/2021/4 https://madnight.github.io/githut/#/pull_requests/2021/4
- BoorishBears 5y agoNot really... Groovy was never really in the building and is just awful. Scala is like a reimagining of the building that happened to find the old foundation useful. Clojure is like a skybridge from the Lisp skyscraper across the way. Kotlin is the only JVM language that's gained traction while aiming to be Java but better, the rest just happen to use the JVM, but calling them "evolutions" of Java would be deeply misleading.
- pjmlp 5y agoIt gained traction on Android thanks to Google pushing it over their creptic Java implementation, while pretending anything beyond Java 8 never happened. It will follow the path of every other JVM guest language. I will care when the JVM gets a single line of Kotlin commit. Google should just buy JetBrains and rename ART into KVM.
- BoorishBears 5y agoThis is being too charitable to Java imo, after all we had stuff like Retrolambda at the time. Kotlin exists because Java moved like molasses for years If Java had moved like C# it'd be a much nicer language today, and Kotlin wouldn't be needed. Even comparing Kotlin 1.0 to today's Java nearly 6 years later would favor Kotlin for ergonomics with stdlib, nullability, reified generics, and syntax
- pjmlp 5y agoRetrolambda, yet another kludge, instead of invokedynamic calls. Kotlin exists because JetBrains wants your money, that is all. > The next thing is also fairly straightforward: we expect Kotlin to drive the sales of IntelliJ IDEA. We’re working on a new language, but we do not plan to replace the entire ecosystem of libraries that have been built for the JVM. So you’re likely to keep using Spring and Hibernate, or other similar frameworks, in your projects built with Kotlin. And while the development tools for Kotlin itself are going to be free and open-source, the support for the enterprise development frameworks and tools will remain part of IntelliJ IDEA Ultimate, the commercial version of the IDE. And of course the framework support will be fully integrated with Kotlin. https://blog.jetbrains.com/kotlin/2011/08/why-jetbrains-needs-kotlin/ https://blog.jetbrains.com/kotlin/2011/08/why-jetbrains-need... Outside Android, I will care about Kotlin when KVM becomes an unavoidable reality, until then, it can party with Beanshell, jTCL, Jython, JRuby, Scala. Closjure, Groovy, Frege, and plenty of other ones, https://en.m.wikipedia.org/wiki/List_of_JVM_languages https://en.m.wikipedia.org/wiki/List_of_JVM_languages
- ivanmontillam 5y agoTo elaborate a bit more, and in my opinion, a web browser provides an essential service, much like the water from the mains or the electricity that powers your home. Without the web browser engine, no matter which HTML, CSS and JS you write, the fact is it cannot run without it. What would be great to have is choosing which programming language runs in your browser. It'd be great for me to move away from JS engines like V8 or SpiderMonkey, and be able to run CPython (directly, not transpiled to JS) as my interpreted language. The stack could be HTML, CSS and Python, for example. WASM came to solve part of this, fortunately. We are missing an excellent opportunity for more powerful web technologies if we don't embrace WASM.
- dsego 5y agoAgreed, no reason <script type="text/javascript"></script> couldn't be <script type="text/python"></script>. And then all the native APIs would be exposed in a lowest common denominator kind of way.
- yawaramin 5y agoThat's actually not what the article is about. It's more about the backend server managing all or most of the application state, and sending slices of JSON or even fully-rendered HTML to the browser, which is responsible only for swapping in these new slices of UI with a thin layer of JavaScript. In other words, it's about creating a SPA-like experience with little or no custom-written JavaScript.