gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Extended opaque


From: Gaius Mulley
Subject: Re: [Gm2] Extended opaque
Date: Mon, 01 Nov 2010 21:52:22 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Chris Lilley <address@hidden> writes:

> Hello,
>
> GM2 extends PIM and ISO Modula-2, allowing an opaque type to be any type 
> rather than requiring it to be a pointer.
>
> It seems to me that this is a good, type-safe extensio very much in the 
> spirit of Modula-2. But, its a compiler-specific extension.
>
> Was this added because it was an experiment, or to see if it worked,
> or because this feature should really have been in the standardized
> language?

Hi Chris,

ahh yes it was implemented because the wording of one of the
standardisation efforts seemed to keep this door ajar (at one point in
the late 1980s iirc).  I first implemented the extension in the m2f
compiler.  This switch can be useful even if only used with pointer
types as gm2 will produce better debugging information.  Ie you can
follow through the opaque type,

> Are others using this feature?

I use it and gm2 builds with this flag on.  Although gm2 only uses
pointer based opaque types.

> I recently made a module with a fully opaque type, then backed it out
> because I didn't want to depend on compiler specifics. But the
> resulting exposed, semi-opaque type seems less satisfactory to me.
>
> I would be glad of thoughts or guidance from others on this feature.

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]