Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Nim beginner's feedback: "echo type(1)" does not work #5827
I've recently introduced Nim to a number of colleagues (mostly with a C++ and Go background), and I want to share some of the feedback I got.
Surprise: you cannot print the type of an expression
This seems easy to fix with the following patch (not sure if that is correct), but I wonder why something like this not enabled by default given that the
I looked at the typetraits module. Everything from
I constantly forget the name of the typetraits module whenever I need to print the name of a typedesc.
Yes I think that this smartness of the compiler would be very great, but that would be another issue.
And you might be right that there is some unnecessary stuff in the system module that could also be in another module, but to stringify a type is not one of those bloat functions, it just improves accessability.
Things where I think they are not necessary in the system module are more of these things: