-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow type names with "." character #118
Comments
The intent was for the module system to do that namespacing, the way Titan is doing it, just never got around to doing that for Typed Lua. It should have been done that way from the start, as it is more difficult to retrofit on the existing compiler. Knowing the difficulty was also the reason I advocated for the adding modules to Titan right away, and was sad to see it removed in the "Pallene" Lablua fork of that. |
What do you mean by "module system" here?
|
That was exactly the plan, and the way it is done in Titan. Dotted type names are canonicalized to fully qualified (think Java-style) type names if they reference an imported module, and the typechecker then keeps a global registry of module types. For Typed Lua the easiest way to do the same it is probably a pass over the AST prior to typechecking that canonicalizes dotted type names, instead of doing all in a single pass like Titan's typechecker does. |
As type names inhabit a global namespace, I would like to use some sort of namespacing. To follow lua module name convention, I'd like to use
.
as a separator. However this results in a syntax error:Perhaps you should allow a quoted name? e.g.
interface "foo.bar"
The text was updated successfully, but these errors were encountered: