Re:Ask HN: Weirdest hack that you ever saw in production?
by ups101 on Sunday March 25, 2018 @01:13PM
(#16673164)
Did you consider the point about code being defined only at build-time, not being available for inspection by the developer? That sets it apart from most auto-generating code scenarios I've seen.
Re:Ask HN: Weirdest hack that you ever saw in production?
by mikelevins on Sunday March 25, 2018 @12:59PM
(#16673080)
Hey, I'm a common lisp programmer. I'm down with automated code generation. But in Lisp or in Scala, as you say, it's in-language, so you can see what's going on by reading the code. This was different.
That being said, I usually work in Scala which provides language-based tools for that, so it definitely helps with avoiding the "dark magic" sentiment you may have had.
But why was it done that way ? It reduces boilerplate, copy-paste errors, code duplication, in ways sometimes not made possible by inheritance or composition.