Thinking about this more: "zoom in" would actually mean running the compiler on some highlighted section of code, expanding it into the lower-level code that the compiler would normally generate (but wrapped in an "asm" block, or equivalent)
-
-
Show this thread
-
An inescapable downside of such a language would be that it would severely limit the compiler's ability to do whole-program optimization. E.g. you might think you're helping by writing inline asm, but actually the compiler could have proven that that block was unreachable anyway.
Show this thread -
So it's certainly possible that such a language would typically result in slower programs. Compilers work best when given full reign with total context, and this language deprives them of that.
Show this thread -
However, compilers fail in one important respect: they can't read the programmer's mind and discern their *intent*, which often leads to "fighting the compiler." Ideally this language would have none of that. The compiler would be like your lab assistant, not your boss.
Show this thread -
Here's a fun thought: junior programmer writes a high-level version of a function, which works fine but runs slowly. Then they pass it on to the senior programmer, who compiles it to a lower-level language and hand-optimizes the generated code.
Show this thread -
(Then, they pass it to the greybeard, who compiles the low-level language to asm and hand-optimizes it into some Story-of-Mel-esque monstrosity.
)Show this thread -
But the cool thing is that all of these versions are interchangeable. If the greybeard introduced a bug, you can "rollback" to the senior version while you debug. Good tooling could make this painless.
Show this thread
End of conversation
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.