3 ms·
You don't have to wait for the compiler to complain. Using: pragma(msg, T); where T is any type will print the type to the screen during compilation. prag
by WalterBright 7y ago
You don't have to wait for the compiler to complain. Using:
pragma(msg, T);
where T is any type will print the type to the screen during compilation. pragma(msg) will print all kinds of things, making it a very handy tool to visualize what is happening while compiling. I use it all the time.
- slezyr 7y agoPrint-debug you program before it's even compiled and even have a bug is a bag idea.
- arunc 7y agoWhy so?
- entropicdrifter 7y agoYou shouldn't need to reverse-engineer your own program just to understand the code you wrote yourself.
- pjmlp 7y agoApparently it is a common Go pattern to discover which interfaces a type implements.
- WalterBright 7y agoI salute those who never have to debug their own code :-)