3 ms·
Well, HTML is one example of general-purpose UI framework that's separate from JavaScript in a way that lets you replace JS with something else. Why can't somet
by k_bx 7y ago
Well, HTML is one example of general-purpose UI framework that's separate from JavaScript in a way that lets you replace JS with something else. Why can't something similar be done for Flutter components?
There's an example of elm-bootstrap library, where bootstrap components were reused, but Elm logic was added on top instead of JS one. Why wouldn't refactoring Flutter into Flutter-core similarly work?
Also, I didn't understand your comment about the container and how it's related to this.
- skybrian 7y agoThe HTML DOM API is in no way separate from JavaScript. It's a mutable API that's tied into the JavaScript garbage collector, uses inheritance (unlike some languages) and uses JavaScript values in method parameters and return values. The only way to access it (once a web page is loaded) is through JavaScript. To interact with it from another language, you need at least an adapter layer that does foreign function calls to JavaScript, or you need to compile the entire language to JavaScript like Elm does. Elm works because Elm is specifically designed to compile to JavaScript and they put a lot of effort into making it smooth. (And bootstrap is part of the same JavaScript ecosystem.) In theory you could do the same thing for Flutter by compiling some other language to Dart. It seems unlikely anyone would make the effort any time soon, though. Regarding the Linux container, it's not directly related; I was just pointing out how someone might do Elm development on a Chromebook.