[M3devel] I know, I know...

Hendrik Boom hendrik at topoi.pooq.com
Fri Aug 24 16:00:52 CEST 2012


On Thu, Aug 23, 2012 at 12:51:15PM -0700, Mika Nystrom wrote:
> 
> Well I don't think Jay said that bytes couldn't be unpacked in Modula-3
> (you can just use Word for that).
> 
> But I think the point was that a compiler back-end might not necessarily
> obey your packing instructions?
> 
> Here's what I think you should do... it would be super useful, both to
> you and other people in the future.  And completely independent of
> compilers.
> 
> Write a something-or-other that uses m3tk to read your RECORD type
> spec, plus pragmas 

Pragmas are definitely the wrong choice.  If they are ignored on an 
implementation that  doesn't recognise them, this will be the wrong 
semantics.

Coding all the extraction and insertion functions is obscure, picky, and 
error-prone.  Bit-mapping is one of the reasons people use systems 
languages, and the lack of it is a deficiency in Modula 3.

Not that I'm advocating rewriting the compiler right away.  It may be a 
deficiency we can live with.

-- hendrik



More information about the M3devel mailing list