[M3devel] I know, I know...
Daniel Alejandro Benavides D.
dabenavidesd at yahoo.es
Fri Aug 24 17:07:35 CEST 2012
In SPIN M3 you could VIEW any type as a bit string, but they also had a different compiler, so it's difficult to compare, in any case the thing written like that is UNSAFE in the data abstraction sense and so it's kind of easy see that structure pattern in any other language with UNSAFE patterns. I like more structural typing in the sense if all are different you can't assign them, if you can then it's because they are not mismatched and obey the semantic rules of the language. Interesting combination of both would make a better RT though.
Thanks in advance
--- El vie, 24/8/12, Hendrik Boom <hendrik at topoi.pooq.com> escribió:
De: Hendrik Boom <hendrik at topoi.pooq.com>
Asunto: Re: [M3devel] I know, I know...
Para: m3devel at elegosoft.com
Fecha: viernes, 24 de agosto, 2012 09:00
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
> 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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the M3devel