🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #935

Re: Relationship between C and C++

#935
From: David Gudeman
Date: Thu, 22 Mar 1990 07:21
24 lines
1590 bytes
In article  <4869@vanuata.cs.glasgow.ac.uk> jack@cs.glasgow.ac.uk (Jack Campin) writes:
>[about C style pointers]
>Thirdly, the aliasing it enables is a semantic mess.  If anyone claims
>different, let's see your denotational model of ANSI C.

Sure, but first show me your denotational model of Ada.

Seriously though, there is nothing unusually complex about the
semantics of pointers.  In fact, the traditional model of stores uses
pointers (usually called "locations") anyway.  The only things that
have to be added are (1) a new data type (pointer) that includes, not
only a location, but also an indication of what the pointer points at
and any index constraints, and (2) operations on the new data type.
One workable implementations is defining a pointer as a triple, and
defining operators to do the appropriate range checks.  Incrementing a
pointer past the bounds of its array is an undefined operation.

The description is not simple, but then almost no substantial
programming language feature is simple to describe mathematically.
-- 
					David Gudeman
Department of Computer Science
The University of Arizona        gudeman@cs.arizona.edu
Tucson, AZ 85721                 noao!arizona!gudeman
Technical Details
Message-ID: <19255@megaron.cs.arizona.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!ig!arizona!gudeman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!ig!arizona!gudeman
From: gudeman@cs.arizona.edu (David Gudeman)
Newsgroups: comp.lang.misc
Subject: Re: Relationship between C and C++
Message-ID: <19255@megaron.cs.arizona.edu>
Date: 22 Mar 90 07:21:55 GMT
Organization: U of Arizona CS Dept, Tucson
Lines: 24