Re:Why I Like Go
by lemming on Sunday February 10, 2013 @02:22AM
(#5195722)
I agree with the GP's statement, because "harder to debug" == "vastly inferior". In my last job we worked a huge amount with generated code, and having generated source that you can step through is essential. I've never seen runtime generated code that's easy to debug.
[ Parent
| on HN ]
Re:Why I Like Go
by contingencies on Sunday February 10, 2013 @03:16AM
(#5195797)
Your logic seems to be that because some runtime code can be harder to debug (This is often true but not always), having personally encountered such, you therefore declare that all runtime code is vastly inferior. Sorry, but this is ridiculous. Can you contribute something more solid than an anecdote?
I'm sorry you think it's ridiculous but it's just my opinion, after all. Feel free to ignore it. Can you give us an example of runtime generated code that is easy to debug?
Re:Why I Like Go
by contingencies on Monday February 11, 2013 @09:33PM
(#5204874)
I can't. However, I do believe that software development in general is headed away from monolithic compilation, and that future systems will be largely real time, parallel, multi-component, perhaps more heterogeneous, and almost certainly predominantly interpreted.
Our habits trap us in to seeing things one way.
Lisp macros?
Lisp macros are compile-time generated code (think "small compiler plugins"); nothing happens at runtime in a compiled implementation.
More importantly, and to tie this back to the OP's comment, I would strongly recommend to implement any non-trivial macro as a "shell" which delegates to a normal function (cf. eval-when); that makes it much easier to debug/trace expansions from the REPL.
In other words: you can have it both ways! :)