what was the problem with the old post blit operator already ?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Thu Feb 15 03:17:11 UTC 2024


On Wednesday, February 14, 2024 7:17:15 PM MST Basile B. via Digitalmars-d-
learn wrote:
>  From what I remember, it was that there was no reference to the
> source. Things got blitted and you had to fix the copy, already
> blitted. Was that the only issue ?

There were probably some use cases where you needed access to both the
source and the destination so that you could do something to the source as
well, but the core problem was simply that blitting and then mutating the
copy to fix it doesn't work with const or immutable objects, since it would
violate the type system to cast away const or immutable to fix the copy. The
only way to work properly with const or immutable is to construct the object
with the changes in the first place rather than mutating the copy after the
fact.

- Jonathan M Davis





More information about the Digitalmars-d-learn mailing list