3 ms·
It is funny, because this is the argument against most use of macros in lisp. To the point that everyone knows that macros make it harder to debug code. The l
by taeric 9y ago
It is funny, because this is the argument against most use of macros in lisp. To the point that everyone knows that macros make it harder to debug code.
The lost part, is few people actually "debug" in the "interactive debugger" sense of the word anymore, such that many things that were frowned upon in lisp and related languages are now getting a lot of exposure. And I feel it is truly sad how few people know how to step through a program nowdays. (Obviously projecting some. Maybe I'm in an odd corner where nobody uses an interactive debugger, but it has been a long time since I found coworkers that were used to using one. And, in this, I'm including REPL based workflows. Yes, I know they are strictly different. I just feel they are in the same family for this discussion.)
- linkmotif 9y agoWhat do you mean few people know how to step through programs nowadays? Is it uncommon to open up dev tools and step through code? I step through code whenever I get lazy or tired and don’t want to think and am using a platform with a nice debugger. I’d think this was very common but I live in a hole.
- taeric 9y agoMajority of my coworkers have not done this. With some of the newer stacks, it is not really possible, yet. And in a distributed world, it is genuinely not feasible, that often. I think this is an odd one. That the act of stepping through code hella build the skill to mentally simulate stepping through code. Which helps reason about it. I don't have data to back that claim. :(
- barrkel 9y agoWhen the abstraction stack gets high enough, stepping turns into a bit of a minefield - if you step into where you should have stepped over, you can get lost in irrelevant weeds. Microsoft and some others have tried to put step barriers in code that prevent accidental step into for this reason ("only my code"). But it's also a change in coding conceptualisation. Personally I understand things from the ground up, from composition of very low level components. I find it hard to reason about a system's performance and failure modes without doing so. But increasingly developers have only a surface area knowledge about the things they use, and instead know a lot in terms of breadth instead of depth. This approach is more effective for building something quickly by duct taping disparate things together, and this is the majority of modern commercial coding. These people don't need debuggers: it gives them too much information. They need examples, and they code by idiom and analogy instead. Things like event dispatchers and async also greatly diminish the power of the debugger.
- taeric 9y agoAgreed. And I actually fully agree with this being a strong reason not to use macros in lisp. Made a bit more important there, because stepping through a macro involves not just being in other code, but jumping between phases. That said, my main point is that where many folks used to advise caution, such that instead of promoting lisp, they would create new languages where they could hide some of the magic, it seems that people are gung-ho on many of the higher abstractions now, regardless of the mental costs they bring.