Skip to content

POC for #48#53

Open
kevinresol wants to merge 3 commits intobenmerckx:mainfrom
kevinresol:poc_48
Open

POC for #48#53
kevinresol wants to merge 3 commits intobenmerckx:mainfrom
kevinresol:poc_48

Conversation

@kevinresol
Copy link
Copy Markdown
Collaborator

@kevinresol kevinresol commented Jul 18, 2021

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.

@benmerckx
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown
Owner

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

@kevinresol
Copy link
Copy Markdown
Collaborator Author

kevinresol commented Jul 19, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants