Power of Declarative Programming #27
canmingir
started this conversation in
Thinkers Club
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Declarative Programming is everywhere even though we don't name them. SQL, HTML, regex, even JavaScript is declarative to C/C++, and C/C++ is declarative to assembly language so on so forth.
In this project, we took a different approach that usually declarative languages are defined in complete different set of language syntax, but I think the world has reached enough programming languages. Instead, we used exact same JavaScript syntax and but rerenders declaratively. For example:
In imperative language like JavaScript, the
bis3because variablebreferences to the memory location ofa + 2, but if you run exact same thing in Nucleoid, the results is4because it is declarative. It means the declarative runtime does additional calculation whenais updated as adjustinga's dependencies likeb.One of advantages of repurposing the same JavaScript language syntax is this gives us an opportunity to extend what JavaScript offers, so that we can focus on controlling flow, applying logic programming and managing datastore while JavaScript is still runtime engine.
Beta Was this translation helpful? Give feedback.
All reactions