Comments (1)
Never mind. Aliasing is broken anyway. Even if I don't use nested types, I can't alias a generic into a specific type and have the type checker accept it as an alias. It just sees it as a altogether different type.
This also means that coding with generics becomes very unwieldy very quickly. Because you have to write out the whole mess all the time making the code all but unreadable and unmaintainable. Makes it very tempting to slap on some kind of macro preprocessor that does simple template substitution, as that would be better than this.
from tl.
Related Issues (20)
- No errors reported when assigning value directly to a record table
- Function does not enforce argument record type if variable type is inferred
- [next] `self` cannot be constrained by an interface
- [next] interface methods
- Possible Typechecking Failure on Union Return HOT 2
- unexpected propagation of <const> attribute HOT 1
- missing narrowing type when not simple expression
- Inconsistencies between string escapes in Lua versions are not handled by Teal
- Feature request: Ability to rename the compiled files using regex HOT 2
- weird shadowing behavior regarding generic type names HOT 2
- reexport a nested table type HOT 1
- How do i solve this error? : argument 2: got type constant (alias), expected constant HOT 2
- flow-typing of return types at odds with polymorphic functions
- Support forward declarations, at least in a record HOT 3
- Nested record metatable issue? HOT 1
- [next] declaration of record methods does not work for aliased types HOT 2
- [next] union type does not specialize with and-or idiom
- [next] type alias definition gets confused with generics
- [next] Internal Compiler Error on `tl types` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tl.