For further actions, you may consider blocking this person and/or reporting abuse
For further actions, you may consider blocking this person and/or reporting abuse
Ivan Livshits -
Jackson Kasi -
dev.to staff -
Once suspended, blackcat_dev will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, blackcat_dev will be able to comment and publish posts again.
Once unpublished, all posts by blackcat_dev will become hidden and only accessible to themselves.
If blackcat_dev is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Sasha Blagojevic.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community safe. Here is what you can do to flag blackcat_dev:
Unflagging blackcat_dev will restore default visibility to their posts.
Top comments (41)
I think competition is coming. Elm and languages that could target WebAssembly should bring some variety to front end web development.
Kotlin/JS is also a really interesting concept and I'd love to see it get more momentum. Unfortunately, I'm thinking that Kotlin is just too strongly tied to the JVM for it to really get much more use than in multiplatform projects (sharing same data models between front and back end).
Thoughts on this?
JetBrains / kotlin-native
Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.
Kotlin/Native is primarily designed to allow compilation for platforms where virtual machines are not desirable or possible (such as iOS or embedded targets) or where a developer is willing to produce a reasonably-sized self-contained program without the need to ship an additional execution runtime.
tools.jar, which is not included in JRE;
yum install ncurses-compat-libsmay be needed
To compile from sources use following steps:
First, download dependencies:
Then, build the compiler and libraries:
The build can take about an hour on a Macbook Pro To run a shorter build with only the host compiler and libraries, run:
To include Kotlin compiler…
I'm expecting this to catch on more than Kotlin/JS because of Kotlin's relationship with Android. More likely for people to want to share Kotlin code between Android/iOS than backend/frontend. In my (quite limited) experience, Java-based backends seem to be used more for microservices and APIs, as opposed to full stacks like with Rails or PHP backends, leaving less incentive to introduce Kotlin into a JS codebase.
That being said, I think the popularity of Typescript and Flow show that web developers do want static typing, I'm just not sure how likely it will be for Kotlin to become a popular option.
I feel like any attempt to move Kotlin away from the JVM is a step towards compiling to all sorts of places because the big hiccup when moving off is that you can no longer dip into the Java ecosystem to fill the gaps. It forces certain problems to be solved which could than make the next thing easier.
"That being said, I think the popularity of Typescript and Flow show that web developers do want static typing, I'm just not sure how likely it will be for Kotlin to become a popular option."
I really did like WebAssembly in concept. Something I've been reading about recently which I will eventually do a full post on is a project by Oracle called GraalVM. In it's core, is basically a framework to create programming languages in such a way that they are interoperable with all other languages made with the framework as well as being immediately compatible to be run on the JVM. Making a JVM is really hard so I really loved this idea. ((the refernce Ruby implementation they made is ~400x faster than real Ruby iirc))
This is what I imagined WebAssembly to be when I first heard about it. A base open format that multiple languages could target to gain the speed benefits that JS engines have already built. Kinda like .NET
It's a good point, but I'd assert that we lost that a while ago. Minification, obfuscation, optimization, etc, mean JS is often as unaccessable as WASM. On the bright side, the WASM tooling is looking pretty good and could help devs make sense of it. Of course, if you're at that point, you're probably past "view source" to make sense of things. I suspect that the way this learning will manifest, going forward, is via OSS (meaning access to the uncompiled source). But it is definitely a good point, and it's the same sentiment that causes me ambivalence around HTTP/2's TLS everywhere (I know there are ways to get around that, too, but they're cumbersome and require you to really know what's going on).
Anyway, I'm a fan of it, b/c I think the browser should be treated like a platform (due to watching a lot of Alan Kay, esp The Computer Revolution Hasn't Happened Yet), so my POV is that it should have always been a bytecode interpreter, and WASM corrects that problem.
I'd love to read your post on GrallVM, btw! I read their paper on Truffle, a while back and what I understood of it sounded astoundingly cool! Also, they've been really kicking ass on the optcarrot benchmark (I don't think it was 400x, but it was impressive enough that I stopped and took note).
I doubt C/C++ would catch on for the web necessarily, but maybe Rust. It seems like that's the high-perf language that has the most momentum due to novelty/excitement and stewardship from Mozilla.
I agree. JS isn't going anywhere but there is always going to be people who want something very different. I think Elm qualifies as quite different from JS.
TLDR: The web does not need a new language, but instead a new runtime to address the weaknesses of the DOM. Crucially targeting this runtime should build upon and not abandon the best parts of web technologies (simplicity, ease of access).
The DOM was never designed with performance as a consideration and certainly not with rich web applications in mind. Avoiding excessive repaints and reflows, minimising the number of DOM nodes etc. are all still concerns no matter which library or language you use.
I don't think it will ever happen and would take years, but it would get the biggest win in performance if a replacement for the DOM (a new web runtime) were to be standardised. It is a hazy idea - and I imagine other people have had better thoughts - but it seems like the way to go is compilation...
The main benefit of this approach is it bring the web up to the same level of responsiveness and performance as a native application by removing the bottlenecks associated with parsing and managing the DOM/CSSOM. A secondary benefit is it would remove the need to perform manual performance optimisations like inlining critical CSS and hacks like the PRPL (push, render, pre-cache, lazy load) pattern.
In some ways it would be taking us back to the plugin model - but unlike the plugins it would be an open standard governed by the w3c with an implementation test suite which could be run by all vendors.
To quote Sean Denny from earlier:
This is a big concern and to address this the source documents must be accessible from the same location as the binary. There are a couple of possible ways this might be strongly encouraged:
This idea does sound interesting. I do have a question though: when you do "view source" on the page, I assume it shows the updated HTML source, correct? So would the markup source have to be updated anyway in the browser, would markup viewing not include any updates that have been dynamically done to the page, or would there be no viewing of the markup (in your opinion)?
Also, this does make me want to look into DOM performance. For some reason, JS seems to always be blamed (and I'm also guilty of that). But it does also make sense that markup, which needs to be re-rendered with each update, could actually cause the performance issues.
The browser would be running native (compiled) code - it wouldn't be parsing the markup, building the DOM etc. As such there would not be the concept of "generated source" as it exists today, but it would still be possible to map the rendered views back to the original (declarative) source documents.
Definitely try profiling the layout and painting performance.
The perception of performance is far more likely in most cases to be layout related than any scripting.
I've been thinking what if browsers adapt Elm completely as a new JS specification. I think there is a chance but it's like 0.01% or higher?
But this is highly an aesthetic choice (what newer features we want to code in) and I don't think this will ever come through any commitees. But it would be really nice, just like when you compile your C++ code with
-std=c++1zflag, except this solution punish you if you want to use older standards.
I thinking realistically about this JS alternatives: it's never gonna happen, that W3C will pick up another language for a browser standard, never, ever. So, do you want a NPAPI solution like what Java did in the last decades? That was great, isn't it? Especially if you are a sysadmin, managing 20+ workstations in a company with different OS + different governmental webapps which requires different java versions to run, with different settings? Feel the pain that sysadmins feel, I also lived in this hell. Upps, luckily that's not possible anymore, because every major browsers, including Firefox, Chrome, Opera, Edge are blocked NPAPI execution and not just that, they removed it from their browsers, so in the last couple of months NOT possible to run Java on the browser anymore. Because, you know, many viruses downloaded into the computers by Java. It was the hacker heavon to have an user installed execution environment on lots of enterprise PCs (JS runs in the browser VM), where you can send any payload you want, after the user accepted the execution. Good bye Java, we will never mis you. But what the government did in this case? Nothing! We run all of these important apps for work in Internet Explorer 11. :) What will happen if Microsoft will release an update to Windows 10, for remove NPAPI support from IE11 as well? Well, probably in this case, every mayor office or government institution, including police, hospitals, army, etc. won't be allowed to update their windows, until not comes a webapp rewrite (which is possible within 2-3 years, in the hurry they work...). Nice, new world isn't it? Thanks to Java and it's never-becoming-a-real-standard execution model. :) Alternative solution is to use an old Firefox/Chrome version as well (I use Firefox 52 ESR in one case, with turned off updating), but luckily, some government java program won't run any other browser, only IE11...
I would be the happiest person if I can program client-side apps using Go (natively integrated into the browser), but as far as Google can implement in Chrome, this still not become a standard by W3C, so it's not worth bothering. Eventually we will have a Webassembly compiler for most of the languages, but at it's current state, without active projects / frameworks, no one using it for everyday tasks, like a client-side rendering library (and I think that's not even possible right now).
The main reason would be to use webassembly for me on the client-side is to protect the source code. If you not program in 3D and you only want to write a client-side 2D apps (like with React, Vue), execution performance is really not that important for companies, instead what is important is product to market ratio. The payload size also important, but I don't believe that an extensive framework (which we didn't saw yet), will be much smaller size in binary then a minified Preact project.
But now they can go and use Elm, Purescript, ReasonML... or maybe something else.
Actually, there's somewhere a Flow library (sorry, I forget the name), which compiles to client side as well, to not strip out the type checking on the client side (I don't know unfortunately, Elm, Purescript or ReasonML have such feature).
Transcompiling from another language to JS is not competition (in my view), is like JS on mobile, low performance, missing features, headaches.
A new language to be adopted native by the browsers ... most likely will not exists (because of the conflicting browser vendors, it's hard to agree on one).
WebAssembly is enlarging the ecosystem, you can use the power of compiled languages, but it is not competition, they are limited in what they can do.
Flash is dead, Microsoft and Google tried to add a competitor and failed.
Time will tell.
I think the best thing for web dev, which would bring us web 3.0, would be for browsers to adopt an additional language natively, or at least to open the API for third parties to do it somehow.
I don't see any good reason to do that, really, but the downsides are immense. It will fragment the market and all the projects/teams.
Devs will jump from one to another like mobile devs do from iOS to Android.
Each library must be implemented twice, each developer must learn 2 languages and 2 x avg(frameworks) count.
Just see what happens now with Android (3-4 ways to make JS apps, Java, Kotlin, C++ and now Dart/Flutter). Multiply that with the web complexity (tools, APIs, frameworks, paradigms, nodeJS, ...).
So I hope not, the web is already a complex ecosystem, with 1 language.
All other industries jumped to JS, not viceversa. You can write neural networks and block chains in JS, browsers didn't adopted solidity or python.
I guess the API you are talking about is the WebAssembly, you can use any language, presuming you can compile it to the standard.
Honestly? No, I don't think it does. It's evolving so quickly and absorbing features from other languages, so I don't think there any technical advantage to writing in another language. Strong typing is basically a static analysis issue that doesn't require browser involvement and already has two good solutions (flow and TypeScript).
IMO, that's an argument in favour of the OP's point. In your mind, JS evolving is a good thing, so we don't need a language to compete with it. But there is another perspective that its evolution is a bad thing and we need an alternative that is small and stable. So, depending on what you prioritize, the JS changes are positive, or they are negative. Hence, it makes sense to decouple the browser from the language and treat it like a platform (ie if it was a VM, then you could tell it where to find the bytecode for your interpreter, and then you could ship code to it in any version of any interpreted language that you wanted -- or compile your language to its bytecode). Then old websites don't break, b/c they can link to the version of JS they were implemented against (exempting changes in the platform itself), and you don't have to wait for browser adoption to ship features, b/c nearly all features are built on the platform, not provided by the platform natively, so you can implement new features and ship them to the browser without depending on the browsers to implement them, and to implement them consistently.
Sorry i will not spend time talking about the specific poor design choices of js, there is a lot of information out there.
Going against JS in the front-end is counter-productive... All options that worked out are JS derivatives transpiled into JS. And it produces code bloated with polyfills.
Unless we find a way to pre-load polyfills in some way, it's always going to be difficult to bring the whole runtime of a language into the browser at a fraction of second's notice...
Interesting that both use the Google Closure compiler.
Well this is happening already with WebAssembly, I'm not on top of the news when it comes to WA, but as long as you can produce ways to interop WA libraries between languages, it will be fine. For example let's say someone wrote a WA Lib on rust and I want to consume it in my C# App or Elm App (all of them are targeting the browser with WA) in my opinion there should be no hassle on doing so.
My thought is...
I don't think so. Like CSS and HTML don't need a competitor.
All we need is more features and a more homogeneous support from all browsers
I think it'll be very interesting to see how existing and new languages that work with WebAssembly end up handling the DOM
I think dart actually fits the bill very nicely...