4 ms·
Programming by modifying ASTs sounds very interesting and I really like Lamdu examples. I see, however, many problems, as not being able to introduce even sligh
by krcz 11y ago
Programming by modifying ASTs sounds very interesting and I really like Lamdu examples. I see, however, many problems, as not being able to introduce even slightest modification to the code using terminal, not being able to use textual tools, and problems with source control interop.
The last one is probably the most serious, as it doesn't seem to be enough to plug new diff tool into git. There are still places like GitHub, which are hard to modify. That would mean one would need whole new ecosystem for such language.
Having underlying textual format, possibly based on s-expressions might help. You could modify it using AST editor, but still be able to read the code as text and diff it. Other option is to have two-columns editor, with one column being text source and the other AST, making it possible to edit any of two and have the other updated.
- sdegutis 11y agoOn one hand, requiring a custom IDE to work with code just seems like a recipe for disaster. But on the other hand, when I started Clojure full time, I switched to using Emacs + Paredit + CIDER (née nrepl.el). And come to think of it, I still open Xcode whenever I'm about to crank out any Swift or Objective-C code. I think the difference between those situations and Lamdu's approach is that you still can access the files using any other editor you want. You just don't want to, because that given editor is best(ish) for that given language due to IDE features that help edit it more conveniently. Whereas this Lamdu stuff isn't just a matter of convenience, it's part of the language/environment/experience itself. So yeah, I would never touch this, because it's basically got lock-in that requires its own custom everything, from version control, to needing to rewrite plugins my editor has but Lamdu doesn't (if that's even possible!), etc.
- Peaker 11y agoDo you ever use a spreadsheet?
- sdegutis 11y agoSpreadsheets are not on the same level of complexity as programming and never can be. (In this way, I suppose I disagree with Chris Granger's latest ambitions.) I use spreadsheets for the tasks they're best at, and if I need CSV or some other format, I can always export it.
- Peaker 11y agoBut what are their advantages? After all, their supposed advantage is their live programming, which you claim you already have with ordinary programming languages.
- jestar_jokin 11y agoIsn't this the "sunk cost fallacy"? i.e. we've spent X effort-years creating text-based tools, might as well keep going with them, even if there's a potentially better way of programming? Imagine semantic version control that can parse your AST and tell you which methods, expression, classes, functions etc were modified, instead of just syntax changes like "this line of text is different because you added a semicolon." I'd love to see more semantic-focused tools, eventually leading to generic solutions that work across any AST. Polyglot IDEs like IntelliJ IDEA can come close, but only because they implement their own parsers, to derive an... AST!