🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #619

Re: Oberon question

#619
From: Cheryl Lins
Date: Tue, 01 Sep 1992 16:42
24 lines
1616 bytes
In article <1992Sep1.082031.17228@cs.joensuu.fi> jpussi@cs.joensuu.fi (Jarmo Pussinen) writes:
>In some paper I read that in Oberon, all pointer variables are
>initialised to NIL. Now I would like to know if this means that
>also pointer fields in dynamically (with NEW) allocated records
>or in static records are initialised to NIL. 
>
>In short are pointers always either NIL or valid pointers and
>not garbage pointers. May it vary between implementations?

I lobbied for explicit mention in the language report that all pointers are
initialized to NIL. Unfortunately, that didn't happen. ETH did not consider
it necessary. Any implementation that does not automatically initialize all
pointers is going to violate Oberon's type safety. So it shouldn't vary
between implementations.

For dyanmically allocated storage, to the programmer such storage should
always look like virgin memory when NEW is called. The fact the automatic
storage management (ie garbage collection) can occur should not be something
you have to program around or be aware of.


-- 
Cheryl Lins, Apple Computer, Inc. Oberon-2 Paladin  lins@apple.com
"Oppression breeds violence" - Front Line Assembly
Technical Details
Message-ID: <71886@apple.Apple.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!lins
References: <1992Sep1.082031.17228@cs.joensuu.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!lins
From: lins@Apple.COM (Cheryl Lins)
Newsgroups: comp.lang.modula2
Subject: Re: Oberon question
Summary: answer
Keywords: Oberon, pointers, NEW
Message-ID: <71886@apple.Apple.COM>
Date: 1 Sep 92 16:42:32 GMT
References: <1992Sep1.082031.17228@cs.joensuu.fi>
Organization: Apple Computer Inc., Cupertino, CA
Lines: 24