2 ms·
Take the other example in the paper: https://github.com/breck7/treenotation/blob/master/paper/treenotation.png https://github.com/breck7/treenotation/blob/maste
by zimbatm 9y ago
Take the other example in the paper: https://github.com/breck7/treenotation/blob/master/paper/treenotation.png https://github.com/breck7/treenotation/blob/master/paper/tre...
How does it know that line starting with a number translates into a switch case. Is it the case for all function definitions or just because it's named getLocation?
In any case some logic is hidden there and making the ~10x size reduction is dubious. It only works because there is some other code that's not show here that implements that casing logic.
- breck 9y agoGood points! The example is arbitrary. In a real world use case, Ohayo, with a very large and complex program, my ES6 code base is reduced by a factor of 10x. My tests, in an ETN, are super simple to run, run concurrently, and are about 400 lines of code. They are equivalent to about 4k lines of very good ES6. The tests cover about 70% of all branches in the app (that test coverage number isn't near 100% because lots of files are still experimental and I haven't segmented those out yet in Istanbul). Being able to write great test coverage concisely has been one of my favorite uses for ETNs so far.
- zimbatm 9y agoNice. Pardon for the skepticism but I have seen a number of languages making similar claims. Lisp and SmallTalk where some of the earlier ones. I guess a lot comes down to tooling, will Ohayo be able to understand the various DSLs to extract meaningful context or is it more like a tree editor?