asoffer / Icarus

An experimental general-purpose programming language
Apache License 2.0
9 stars 2 forks source link

Conditional #{export} #70

Open asoffer opened 3 years ago

asoffer commented 3 years ago

#{export} is a tag that can be added to library module declarations making a symbol visible to any importer of that module. For generic declarations, we can either export all or no instantiation. It'd be nice to do that conditionally on the arguments passed to the instantiation.

Perhaps this is a fool's errand, because knowing whether or not it should be exported still requires instantiation, but other such tags could benefit from conditionality as well so designing this isn't entirely worthless.