JSAbrahams / mamba

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

Constraint generation can be generalized to remove `Expect::Collection` construct #437

Closed JSAbrahams closed 1 year ago

JSAbrahams commented 1 year ago

Summary of current issue

I think this construct is overly specific and adds unnecessary logic. For a collection, it is relevant that:

For tuples, there is TrueName logic to deal with such constructs. For literal collections (i.e. defined to top level such as def x := {2,3,4}), we can have helper methods which constraint this:

JSAbrahams commented 1 year ago

Hm seeing as this would greatly help with the dictionary implementation in #438 , I'm moving this to the 0.3.6 milestone.