[m-users.] A question about in-place updating...

Julien Fischer jfischer at opturion.com
Wed Aug 30 08:13:47 AEST 2023


On Tue, 29 Aug 2023, Volker Wysk wrote:

> Am Dienstag, dem 29.08.2023 um 12:58 +1000 schrieb Julien Fischer:
>> On Mon, 28 Aug 2023, Volker Wysk wrote:
>>
>>> Am Montag, dem 28.08.2023 um 13:02 +0100 schrieb Sean Charles
>>> (emacstheviking):
>>>>
>>>> It's an interesting question for me to ponder at the moment! Given all
>>>> that Mercury does, I am guessing that there are no ways to 'pin' a block
>>>> of memory such that it can then be reused over and over, I have played
>>>> around with bitmap but that's not really built for generic structures etc.
>>>> I guess if it came to the crunch I could always re-code those things that
>>>> need maximal performance in C but that kind of negates the reason I
>>>> decided to write this game in Mercury.
>>>
>>> What you describe seems to be a case for unique modes. See section 6 in the
>>> Language Reference Manual.
>>
>> In princple, yes. In practice, the limitations listed in section 6.3
>> mean they're not really useful for that purpose.
>
> In section 6.3: "The only destructive update in the current implementation
> occurs in library modules, e.g. for I/O and arrays. We do however plan to
> implement structure reuse and compile-time garbage collection in the
> future."
>
> Briefly, how are chances that this will happen in foreseeable future?

It's one of the things that requires a new mode analyser (among other
things), so I don't see it happening any time soon.

Julien.


More information about the users mailing list