JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
88 stars 4 forks source link

Create separate construct for tuples (in type checker) #205

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 3 years ago

Summary of current issue

Currently we have sized collections. I'm not sure if this makes sense. I think that it only makes sense to check this for tuples. For other collections (sets, lists, and dictionaries), we should not check the size in the type checker, since this will almost only be known at runtime anyway.

Proposed change

Create a separate construct in Expect for tuples, which are a special case as these are explicitly sized and must be statically checked.