Re: RFCAS - Configuration segments in the San language

From: Nick Landsberg (SPAMhukolauTRAP_at_SPAMworldnetTRAP.att.net)
Date: 07/06/04


Date: Tue, 06 Jul 2004 14:14:10 GMT

Richard Harter wrote:
> On Mon, 05 Jul 2004 22:39:32 GMT, Nick Landsberg
> <SPAMhukolauTRAP@SPAMworldnetTRAP.att.net> wrote:
>
>
>>Richard Harter wrote:
>>
>>>The San language (currently under development) does not use the
>>>"include file" mechanism (which your servant regards as being an
>>>unsavory archaism) nor the use/with scheme for providing for
>>>conditional code et al. Instead a San file is divided into major
>>>blocks called segments, the principal ones being configuration
>>>segments and code segments.
>>>
>>>The intent of the proposed scheme is to avoid the dragging in of
>>>large amounts of irrelevant text (as include files are wont to do) and
>>>at the same time provide for the possibility of configuration
>>>management in an orderly fashion. Below I have given an overview of
>>>the proposed scheme. Comments and suggestions are solicited.
>>>
>>>============
>>
>>[ SNIP FOR NOW ]
>>
>>Richard,
>>
>>I've just scanned your post, not digested it.
>>
>>It would help me immensely if you would be more
>>explicit with "what's the problem you're trying
>>to solve?" And then, possibly in parenthetical
>>remarks in the various sections, describe how
>>your proposed solution and/or the specific
>>constructs help to solve the problem.
>
>
> Sorry, I had supposed (quite erroneously it seems) that I had been
> fairly clear. However some essential background may well be needed.
> As background then:
>
> San is a new language that I am developing the specifications for. A
> San source file is divided into major sections called segments. There
> are different types of segments, the ones of interest being
> configuration segments and code segments. The configuration
> segment(s) roughly play the role of the C preprocessor and the include
> file in that it defines constants in the code, provides a means for
> finding source code in other files, and providing conditional
> compilation/interpretation (think #ifdef ... #endif). TWhat tWhhese
> are issues that come up in many languages with various methods used
> for handling them. Thus Ada has a with/use scheme (I can never
> remember which is which) in which you include the name of a package in
> the code and then access routines in the package.
>
> Unlike the C preprocessor San configuration directives do not appear
> in the San source code. Constants can be defined, e.g., the ever
> popular PI, and the source code can contain the names of dictionaries
> to search for the definition of names. In this regard there are two
> salient features - every identifier is bound to a San object, and all
> objects and identifiers have local scope. The role of dictionaries is
> to provide paths to definitions for unresolved identifiers.
>
> What, then, are the problems being solved? One is that the C
> preprocessor (and related diseases) is an ugly and unfortunate method
> for handling some rather common problems. Thus:
>
> (1) Including header files brings in vast amounts of irrelevant code.
> This not only makes for inefficiency in the compilation and in reading
> the code, it also makes for namespace problems.
>
> (2) Header files are included as incomplete path names (using
> syntactical tricks) that are resolved using the magic of environment
> variables. In cosnequence the entire system of header files has to be
> packaged in a predefined manner. This approach is cumbersome, rigid,
> and does not work well with code supporting alternate features.
>
> (3) Code macros are (IMNSHO) a blight. The C version is particularly
> unfortunate because of (a) the raw textual substitution, and (b) the
> differences in syntax between the preprocessor and the language.
> There are better macro languages; however there are syntax issues
> whenever the macro language and the code language differ.
>
> (4) Inserting conditional code directives in the midst of source code
> is a particularly unfortunate way to handle the conditional code
> issue. It makes the code less readable and it duplicates conditionals
> across routines. Adding new features or supported platforms can be
> ugly.
>
> Etc.
>
> These (mis)features have legitimate purposes. We don't want all of
> the source code (including all of the definitions) all in one file so
> we need some method for connecting all of the source files (including
> all of the definition files) together. We need something like include
> files.
>
> We need (or at least ardently desire) the ability to define common
> parameters once only.
>
> We need (even if we don't think we do) the ability to turn features on
> or off and to select code choices depending on platform or version.
>
> The San configuration methodology is supposed to supply a clean and
> coherent way to meet these needs, a way that provides a clean
> separation between configuration management and code, and a way that
> can handle wide variations in the support environment.
>
> Is this any help?
>
>

Yes Richard, very much so, thank you.

The administration and maintenance of a code base
spanning multiple releases, for possibly multiple
hardware platforms, with possibly certain customer-specific
features (which must only be delivered to that one customer)
etc. can be a huge headache on larger projects.

Now I'll look into it with much more than
just academic interest. :)

NPL

>
>
> Richard Harter, cri@tiac.net
> http://home.tiac.net/~cri, http://www.varinoma.com
> Whoever said money can't buy happiness
> didn't know where to shop.

-- 
"It is impossible to make anything foolproof
because fools are so ingenious"
  - A. Bloch


Relevant Pages

  • Re: RFCAS - Configuration segments in the San language
    ... Instead a San file is divided into major ... San is a new language that I am developing the specifications for. ... finding source code in other files, ... Inserting conditional code directives in the midst of source code ...
    (comp.programming)
  • Re: paxScript.NET, beta version.
    ... looking at providing a language that behaves the same on both paxScript ... > The key features of paxScript.NET are: ... Source code of paxScript.NET is CLS ... > compilant. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: When to use Rosasm, when to use Masm?
    ... > One person's bloat is another man's essential features... ... coded they are...for example, with better macros and assembler features, ... source code" as anything but the roughest of rough measures because it's ... >> to pretend there's more code in RosAsm than there really is, ...
    (alt.lang.asm)
  • Re: How to name variables in a program?
    ... So its an explicit encoding, ... We are also trained to read natural language as well. ... fact even beyond conventions it leads people to write abbreviations on ... > making the whole source code much harder to read. ...
    (comp.programming)
  • Re: Programming to Beat the Odds in Gaming
    ... black-red) strategy is no better than straight-red or straight-black. ... don't even know language it is written in. ... In this pseudo-language, a program consists of functions, and a function ... I still haven't seen your source code. ...
    (comp.programming)