Open kevinresol opened 3 years ago
This seems to be the way to go.
I guess we add an "internal" flag to TypeUtil.className and alike to govern the prefix.
Sounds good.
Should it be default though, or only for name clashes? Debugging experience would be slightly nicer when we can keep the class names similar as much as possible.
--
Somehow the changes cut off type names in the declarations:
Somehow the changes cut off type names in the declarations:
this must be caused by https://github.com/benmerckx/genes/pull/53/files#diff-7bf2a028528f7404eb9d69fd3d7993af0c90edc23bf610f37b4fe63b7d2df333R24 , which is a quick hack to "undo" the prefix.
Should it be default though, or only for name clashes? Debugging experience would be slightly nicer when we can keep the class names similar as much as possible.
Yes I think so, but as a POC I didn't dive deep enough to understand the logic around TypeAccessor and its relatives.
I made a poc for #48 implementing the concept of prefixing types with "$" when inside the module they are defined.
It is quite ugly right now because I just added
"$"
wherever fits. But all the tests passed! 🎉I guess we add an "internal" flag to
TypeUtil.className
and alike to govern the prefix.