DEV Community

Discussion on: My favorite things in Crystal Lang

Collapse
 
shayneoneill profile image
shayneoneill

Be careful with those macros. One thing I've learned from C++ is they are amazing tools for getting stuff done, but they CAN get in the way of comprehensibility and debugging, as essentially a form of magic. I've had a few times debugging both in C++ and Crystal where I've looked at the stack dump or crystals compile error dump (Which by the way is amazing, Crystal really does go that extra distance to try and explain where you've gone wrong and give suggestions on fixing it) and thought "Wait... this isnt what I wrote, whats happening here???"

Like, take C++ boost library. Its an amazing piece of software architecture. But I've lost count the amount of times I've wanted to throw my keyboard out the window (granted, anger attacks are part of life for C++ coding) because something deep in a macro has upset the gods, and the damn thing wont explain to me why.