3 ms·
Rewriting Go source code with AST tooling
- oaiey 5y agoReminds me of C# Code Analyzers based on the Roslyn compiler. It is a deal breaker for a language to have a compiler (in the same language) which exposes the intermediate phases and allow to participate in them.
- spaetzleesser 5y agoA deal breaker? Seems that’s a good thing.
- keymone 5y agoLisp will blow your mind.
- pjmlp 5y agoSmalltalk more so. :)
- ur-whale 5y ago> Lisp will blow your mind. If you're easy to impress and up until you have real world problem to solve. I have used Lisp for 20 years, it's basically a fun toy, nothing more. It's very hard to build anything production-hardened with it, nor anything really fast. What is the percentage of games built in Lisp ? What is the number of database back-end built in Lisp ? How many embedded platform firmware written in Lisp ? Lisp is an academic toy, fun to play with for sure, not something you want to turn to if your livelihood is involved - unless you're a fanatic.
- omnicognate 5y ago"Game changer", perhaps?
- oaiey 5y agoTrue. I am a non native speaker picking sometimes the wrong idioms
- ex3ndr 5y agoIs this a Babel but for Go?
- davelondon 5y agoGo AST was never really designed for re-writing of the source. Comments are stored by their byte offset instead of attached to nodes, so re-arranging nodes breaks the output... Check out my dst (decorated syntax tree) library: it allows you to manipulate Go source without breaking the comments and line-feeds: https://github.com/dave/dst https://github.com/dave/dst