<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all:<br>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.<br>Thanks in advance <br><br>--- El <b>vie, 24/8/12, Hendrik Boom <i><hendrik@topoi.pooq.com></i></b> escribió:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Hendrik Boom <hendrik@topoi.pooq.com><br>Asunto: Re: [M3devel] I know, I
 know...<br>Para: m3devel@elegosoft.com<br>Fecha: viernes, 24 de agosto, 2012 09:00<br><br><div class="plainMail">On Thu, Aug 23, 2012 at 12:51:15PM -0700, Mika Nystrom wrote:<br>> <br>> Well I don't think Jay said that bytes couldn't be unpacked in Modula-3<br>> (you can just use Word for that).<br>> <br>> But I think the point was that a compiler back-end might not necessarily<br>> obey your packing instructions?<br>> <br>> Here's what I think you should do... it would be super useful, both to<br>> you and other people in the future.  And completely independent of<br>> compilers.<br>> <br>> Write a something-or-other that uses m3tk to read your RECORD type<br>> spec, plus pragmas <br><br>Pragmas are definitely the wrong choice.  If they are ignored on an <br>implementation that  doesn't recognise them, this will be the wrong <br>semantics.<br><br>Coding all the extraction and insertion functions is
 obscure, picky, and <br>error-prone.  Bit-mapping is one of the reasons people use systems <br>languages, and the lack of it is a deficiency in Modula 3.<br><br>Not that I'm advocating rewriting the compiler right away.  It may be a <br>deficiency we can live with.<br><br>-- hendrik<br></div></blockquote></td></tr></table>