🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2510

Re: Modula-2, Modula-3, C or C++

#2510
From: Matthias Blume
Date: Mon, 18 Sep 1995 20:13
36 lines
2186 bytes
I wrote:

   If you had read the C standard or any of the more popular
   documents describing it then you would know that neither C nor
   C++ give you such a guarantee either.

In article <43jsfd$1ea@nntp.nta.no> ohk@hal.nta.no (Ole-Hjalmar
Kristensen TF.E/DELAB) writes:

   What makes you think I haven't read it? I was just complaining that
   Modual-3 does not provide it.

What made me think so?  Let's see: A complaint about Modula-3 in
(among others) C- and C++-related newsgroups -- in a thread with a
title, which suggests a direct comparison between Module-[23] and
C(++)...  But of course, you are right, there was nothing more than
circumstantial evidence, the facts do not allow to draw a logical
conclusion of the kind I drew.

Aside from that I still disagree with you:  a programming language
should not specify low-level things like memory layout in its
definition.  Most of the time you don't need that kind of knowledge,
it becomes a pain in the neck when switching to modern architectures,
it prohibits certain kinds of optimizations, and it is generally not
very useful EXCEPT for the dubious abuse of data types as templates
for persistent structures in the file system.

As many others have pointed out already, if you really need to do I/O
with specific memory layouts, then it is usually very easy to write
I/O subroutines explicitly and encapsulate that code in a few
functions.  So you never worry about it no matter what the compiler
decides to do.

--
-Matthias
Technical Details
Message-ID: <BLUME.95Sep18161301@dynastar.cs.princeton.edu>
Path: arc1-ca.pugleaf.net!news.princeton.edu!blume
References: <438nkr$bd@classic.eng.octel.com> <4395o4$3mv2@news-s01.ny.us.ibm.net> <43bdus$l2g@nntp.nta.no> <BLUME.95Sep15102347@dynamic.cs.princeton.edu> <43jsfd$1ea@nntp.nta.no>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.princeton.edu!blume
From: blume@dynastar.cs.princeton.edu (Matthias Blume)
Newsgroups: comp.lang.modula2,comp.lang.modula3,comp.lang.c,comp.lang.c++
Subject: Re: Modula-2, Modula-3, C or C++
Date: 18 Sep 1995 20:13:01 GMT
Organization: Princeton University
Distribution: world
Message-ID: <BLUME.95Sep18161301@dynastar.cs.princeton.edu>
References: <438nkr$bd@classic.eng.octel.com> <4395o4$3mv2@news-s01.ny.us.ibm.net>
 <43bdus$l2g@nntp.nta.no> <BLUME.95Sep15102347@dynamic.cs.princeton.edu>
 <43jsfd$1ea@nntp.nta.no>
NNTP-Posting-Host: dynastar.cs.princeton.edu
In-reply-to: ohk@hal.nta.no's message of 18 Sep 1995 13:33:33 GMT