4 ms·
> Does Imba also include a dom-diffing algorithm Yes. > Woudnt it be better to write a library in imba-lang that can do dom diffing? It is: https://github.co
by judofyr 11y ago
> Does Imba also include a dom-diffing algorithm
Yes.
> Woudnt it be better to write a library in imba-lang that can do dom diffing?
It is: https://github.com/somebee/imba/blob/master/src/imba/dom.static.imba https://github.com/somebee/imba/blob/master/src/imba/dom.sta.... It's a required runtime library if you want to use the tag syntax.
The difference between "language" and "core library" is always a bit mushy. For instance, the JavaScript doesn't only specify the semantics of operations, but also the main objects (String, Array, etc) and a set of functions (push, pop, indexOf, etc).
In the sense that JavaScript ships with default objects for dealing with Arrays and Strings, Imba ships with default classes for dealing with tags and DOM elements. Yes, we could say that tags should just be sugar syntax over regular function calls (which it actually is) and move the DOM diffing out of "Imba". But really, the main point about Imba is the tag functionality and we believe we only need one good implementation.