Criticism of type annotations #2909
Replies: 1 comment
-
First off, I want to be clear that I'm not one of the maintainers of the lua-language-server, so I'm not speaking on their behalf. The following are just my personal thoughts regarding your feedback. I understand your frustration with the type annotations and design choices of this language server. It seems like one of its goals is to cater to the needs of the majority of Lua developers, which unfortunately means it might not always align with more specialized use cases. You bring up some important points about how your policies differ significantly from what's defaulted here. The differences in how you handle concepts like If possible, could you provide some specific examples of where the annotations used by this language server fall short for your projects? Concrete examples could be incredibly valuable for understanding the gaps and might even inspire future improvements or plugins to better accommodate more diverse coding practices within the Lua community. Thanks for sharing your thoughts! 😄 |
Beta Was this translation helpful? Give feedback.
-
My main grievance with the type annotations of this language server is that it assumes it knows how I design my policy mechanisms. It assumes that C#'s language design (or of its likes) is universal and always emulated in Lua. For example, in my policies, the term
Private
has a different meaning than that of C#'sprivate
. For another example, I don't use the termclass
at all, because the concept of aclass
(or that of an object) is completely foreign to how I implement types, inheritance, polymorphism, and dynamic type checking in my Lua projects. Finally, LuaCATS' type inference completely breaks when metatables are involved as mechanisms that enforce policies. That is all, thank you for listening.Beta Was this translation helpful? Give feedback.
All reactions