genes icon indicating copy to clipboard operation
genes copied to clipboard

POC for #48

Open kevinresol opened this issue 4 years ago • 3 comments

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.

kevinresol avatar Jul 18 '21 09:07 kevinresol

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.

benmerckx avatar Jul 19 '21 08:07 benmerckx

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:

image

benmerckx avatar Jul 19 '21 08:07 benmerckx

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.

kevinresol avatar Jul 19 '21 09:07 kevinresol