🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2074

Request For Comment About Handling Of Globals

#2074
From: Richard Harter
Date: Thu, 15 Nov 1990 08:43
37 lines
2009 bytes
This is really a request for comment (and a digression from your
regularly scheduled pointer wars.)

Background:

I am working on a language called Lakota.  This is an interpreted
language with procedures and functions.  It is feasible and natural
to write moderately large programs in this language.  In so far as
is feasible the features of the language are very simple; i.e the
idea is that you don't have to be a language guru to use it.

The Problem:

The issue at hand is globals.  In C there are three levels of scope --
program global, source file global, and block.  Fortran also has
three, blank common, labelled common, and subroutine/function. In
many languages with block structure inner blocks inherit variables
from outer blocks.  And so on.  The common (you should excuse the
expression) thread is that one wants to share access to data across
procedures.  In the course of doing this one wants to avoid nasty
things like name space pollution and ensure nice things like data
hiding and restricted access.

The Request:

What I am looking for is ideas.  What are some of the approaches that
can be used, and what are the pros and cons of these approaches.
Actually what I am fishing for is an approach that combines elegance
and simplicity with the constraint that it should not be confusing
or daunting to a naive user.  It seems to me that this is a worthy
topic for this group.
-- 
Richard Harter, Software Maintenance and Development Systems, Inc.
Net address: jjmhome!smds!rh Phone: 508-369-7398 
US Mail: SMDS Inc., PO Box 555, Concord MA 01742
This sentence no verb.  This sentence short.  This signature done.
Technical Details
Message-ID: <242@smds.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!husc6!m2c!jjmhome!smds!rh

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!husc6!m2c!jjmhome!smds!rh
From: rh@smds.UUCP (Richard Harter)
Newsgroups: comp.lang.misc
Subject: Request For Comment About Handling Of Globals
Message-ID: <242@smds.UUCP>
Date: 15 Nov 90 08:43:27 GMT
Organization: SMDS Inc., Concord, MA
Lines: 37