Y
Hacker News
new
|
ask
|
show
|
jobs
by
gmfawcett
3226 days ago
You can also emit the type during compilation, rather than at runtime:
pragma(msg, "var has type: ", typeof(var));
1 comments
nurettin
3225 days ago
You can also emit the type as a compile error by assigning it to a list or something. A trick I often used when studying C++ back when it was cool.
link