TypeFunction example: ImplictConvTargets
Stefan Koch
uplink.coder at googlemail.com
Wed Oct 7 00:21:04 UTC 2020
On Wednesday, 7 October 2020 at 00:11:20 UTC, Paul Backus wrote:
>
> I agree that allowing completely unrestricted tuple mutation
> would be problematic, but I think it's still worth asking how
> far we could potentially go in that direction.
I would be happy to discuss this over a coffee or beer sometime.
As a thought experiment it's exciting.
> For example, maybe you're only allowed to mutate tuples inside
> the scope that declares them. That would let you implement
> templates like Filter and staticMap iteratively, while still
> presenting an immutable "interface" to the rest of the program.
If you can prove:
- It never escapes a 'mutable' version into a monophonic scope.
- Inside a polymorphic scope (template) all transforms are
derived from the shape defining parameters (template parameters)
or are invariant.
That is necessary, but I am not sure it's sufficient.
More information about the Digitalmars-d
mailing list