11 ms·
>Wait, what? React is a javascript library, not a programming language. Written in javascript.... How can Imba be faster? The same way an advanced primitive in
by coldtea 11y ago
>Wait, what? React is a javascript library, not a programming language. Written in javascript.... How can Imba be faster?
The same way an advanced primitive in a language can be faster than another language + framework code to do the same thing.
What exactly is startling? It's not like languages/libraries and frameworks have some hard defined boundaries. What's a library for one language can be built-in primitives for another (e.g. consider using vectors and hashmaps in C vs Python, or consider something even more powerful like APL or Rebol).
>Does Imba also include a dom-diffing algorithm.. If so, why would you built that into the language... Woudnt it be better to write a library in imba-lang that can do dom diffing?
No, it's not always better to have "a library" vs first class support. Not to mention that some things are impossible to do with regular user code in a language vs first class code (e.g. consider how Go's make() is "blessed" to work as a generic function).
Especially here, where the whole purpose of the language is to be a DSL for web programming and to incorporate all these conveniences.
Nothing new either: we have had languages with first class support for specific use cases since at least the 60's.