microsoft/BosqueLanguage

Affine/Unique/Owner type annotations

Closed this issue · 1 comments

Values are immutable in the Bosque language but this can lead to heavy copy and data movement. A interesting research question is the design of an affine/unique type language that allows us to perform mutable operations on values -- particularly with bulk operations.

At the same time having some unique/borrowed/scoped typing support would also be useful for performing stack or pool allocation.

I am wary of anything that makes mutability visible in a functional/applicative system. Part of my curiosity about your work is around how mutation/assignment is proposed to be seen in Bosque Language and reasoned about. (Ditto things like input-output, random sources, etc.)

At the same time, the power of mutability under the covers, where copying/alteration is not observable is really attractive, especially for bulk operations and also small changes to large entities.

I am conflicted yet want to stick to essential immutability and finding a way to confine mutability in interior functioning that preserves semantic immutability above the surface. I will not go of that quietly in my own work. I will be intrigued to see how Bosque deals with this concern, which may be mine alone.