comp.lang.ada
 help / color / mirror / Atom feed
  • * Re: The Red Language
           [not found] <340E2DC5.25D7@worldnet.att.net>
           [not found] ` <340ebdaf.230366903@news.mindspring.com>
    @ 1997-09-07  0:00 ` Robert Dewar
      1997-09-08  0:00   ` Tucker Taft
      1997-09-12  0:00 ` Robert A Duff
      2 siblings, 1 reply; 46+ messages in thread
    From: Robert Dewar @ 1997-09-07  0:00 UTC (permalink / raw)
    
    
    
    Michael said
    
    <<So. Would the Red language be "doable" with today's compiler
    technology? Would it (might it) be superior to present-day
    languages?
    
    Or do we already HAVE the Red language in our midst?
    (Red = Intermetrics = STT = Ada95)  ;^)>>
    
    
    No, Ada 95 is nothing like Red (at least not in the respects where
    Red and Green most importantly differed). The genesis of Ada 95,
    despite your rather confused equation, is that first a requirements
    document was written, which was very much foucssed on the revision
    requests that had been received. As one of the authors of this document,
    I cannot remember Red coming up at any point during writing the requirements.
    
    Then, given these requirements, a contract was let to Intermetrics to design
    to these requirements, and at that point the design effort, lead by STT, but
    involving many others of course, was a process of realizing these requirements,
    which of course were only guideposts, nothing like a full language design.
    
    But even in this later design process, I can barely remember Red being
    considered as a source of inspiration. Most of the critical missing 
    capability in Ada 83 was also missing in GNAT, so mostly Red/Green
    differences were simply not relevant to the process.
    
    Do not assume that everyone agrees with the idea that Red was superior,
    but too hard to implement. I personally *always* preferred Green from
    a technical point of view, even allowing for the fact that Green was
    far more polished and complete than Red.
    
    
    
    
    
    ^ permalink raw reply	[flat|nested] 46+ messages in thread
  • * Re: The Red Language
           [not found] <340E2DC5.25D7@worldnet.att.net>
           [not found] ` <340ebdaf.230366903@news.mindspring.com>
      1997-09-07  0:00 ` Robert Dewar
    @ 1997-09-12  0:00 ` Robert A Duff
      1997-09-12  0:00   ` Michael & Amy Hartsough
                         ` (2 more replies)
      2 siblings, 3 replies; 46+ messages in thread
    From: Robert A Duff @ 1997-09-12  0:00 UTC (permalink / raw)
    
    
    
    In article <340E2DC5.25D7@worldnet.att.net>,
    Michael & Amy Hartsough  <Hartsough@worldnet.att.net> wrote:
    >What about the "Red" language?
    
    It's interesting, for historical reasons if nothing else.
    
    >I recall reading somewhere (was it an Ada Letters article
    >by JP Barnes? Or was it in the "History" chapter of Booch's
    >Brown book?) something along the lines of, "The Red language
    >contained the seed of a potentially superior language, but
    >was deemed beyond the capabilities of then current compiler
    >technology."
    
    I think that's bogus.  Red had some nasty holes which made it impossible
    to implement, but then so did Green (and so did Ada 83, and so does Ada
    95).  If you read the manual assuming anything unimplementable is just
    ridiculous, so they couldn't have meant that, and assuming that Red had
    undergone all the language bug-fixing that Green did, I think you will
    find that Red is no harder to implement than Green.
    
    >Of course, since I'm going by rather old memory, the quote may
    >have mentioned either the Blue or the Yellow language, but my
    >memory does say, "Red".
    
    I know nothing of Blue or Yellow.  I've read the Red and Green manuals,
    as well as various follow-ons of Green, including of course Ada 83 and
    Ada 95.
    
    >So. Would the Red language be "doable" with today's compiler
    >technology?
    
    Yes, given certain bug fixes.
    
    >... Would it (might it) be superior to present-day
    >languages?
    
    In some ways, perhaps, but not overall, IMHO.  Ada has gone a long ways
    since those days.  So have lots of other languages.
    
    >Or do we already HAVE the Red language in our midst?
    >(Red = Intermetrics = STT = Ada95)  ;^)
    
    The Ada 9X team did not pay a whole lot of attention to Red.  I had read
    the Red manual.  Probably Tucker had, too, but Tucker started working at
    Intermetrics after Green was chosen to be Ada.  Lots and lots of
    languages had some influence on Ada 95.
    
    >From where can I obtain a draft of the Red language?
    
    Beats me.  Maybe Ben Brosgol knows.  I have a paper copy...
    
    In most ways, Red and Ada are similar, which is not surprising, since
    they both came out of the same Steelman requirements, and they were both
    (very roughly) based on Pascal.
    
    Interesting things about Red:
    
    Its modules are called "capsules" (not "packages").  Capsules are given
    in one piece, not spec-vs-body.  (Note recent
    mountains-out-of-mole-hills thread about Eiffel classes vs Ada
    packages.)
    
    Capsules can be "invoked" as either "old" or "new".  "Old" is sort of
    like an Ada with_clause.  "New" is sort of like an Eiffel class, in that
    it creates a new copy of that capsule (but not like an Eiffel class in
    many other ways, of course.)
    
    No underscores in numeric literals.  I really like Ada's ability to say
    1_000_000, rather than 1000000, and I don't understand why many people
    on't use it.  Red doesn't allow it.
    
    Enumeration literals are syntactically distinguished (preceding quote).
    Every enum type is essentially a character type.
    
    You can declare variables locally within any sequence of statements
    without introducing a declare block.
    
    Forward references are allowed to procedures and capsules and so forth,
    but not to variables and constants and so forth.  (Again, check out the
    recent arguments re: Eiffel vs Ada.)
    
    Assertions (similar in semantics to GNAT's pragma Assert).
    
    Imports clauses -- you have so say what you import, as well as what you
    export.  This applies to nested things like procedures, unlike Ada.
    
    Parameter passing semantics is nailed down.  (E.g. the programmer
    chooses whether pass-by-ref-read-only vs. pass-by-copy-read-only is
    used.)
    
    Strings always start at 1.
    
    You can redefine "=" and "<", and then "/=", ">", "<=", ">=" follow.
    Ada does this for "/=", but not the others.  In Red, redefining the
    latter four is illegal.
    
    if <statically-false-expression> then
        <something-illegal>
    end if;
    
    is a warning, not an error.  Similarly for case statements.  I guess
    this is their take on conditional compilation.
    
    Weaker overload resolution rules (than Ada).  Eg no top-down resolution,
    except in limited cases.  Function result types not considered for
    resolution.  But enum lits can be overloaded (and there's no pretense
    that they're functions).
    
    More user-defineable stuff.  Like literal notation, array indexing and
    slicing notation, dot-selection notation, etc.  One can redefine the
    meaning of case statements and for loops, for a given type.
    
    Case statements are more general than in Ada.  The when's don't need to
    be static.  So you can say something like:
    
        case True is
            when Foo(...) => ...;
            when Bar(...) => ...;
        end case;
    
    where Foo and/or Bar might return True.  If more than one alternative
    matches, then the choice is arbitrary!
    
    Function return of caller-unknown-size values is not allowed in Red.
    
    No named-notation parameters.
    
    User-defined finalization.
    
    User-defined assignment.
    
    Generics: Capsules and subprograms can be generic, but so can types.
    Generic instantiation is implicit.  (See recent thread arguing about the
    readability of such a feature.  The examples in the Red manual look
    pretty readable to me, in this regard.)
    
    Tasking uses lower-level primitives (than Ada).  Eg mailboxes.
    
    Delay-until statement.
    
    User-defined scheduling.
    
    Garbage collection seems to be expected.  Unchecked_Deallocation raises
    an exception on error, but this can be suppressed.
    
    Uninitialized variables detected at run time.
    
    One suppresses *exceptions* (not checks).  The predefined exceptions are
    at a finer granularity than in Ada (which conflates many things under
    Constraint_Error, for example).  Green was like Red in this respect
    (i.e. Green had one exception for each "check" defined in 11.7, more or
    less).
    
    And lots of other stuff.
    
    It's hard for me to judge Red, since I tend to compare it to Ada as it
    is today, rather than Green as it was then, which is rather unfair.
    
    Some of it seems better than Ada, some of it seems worse.  I would
    particularly miss named-notation parameters, for example.
    
    - Bob
    
    
    
    
    ^ permalink raw reply	[flat|nested] 46+ messages in thread

  • end of thread, other threads:[~1997-10-03  0:00 UTC | newest]
    
    Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <340E2DC5.25D7@worldnet.att.net>
         [not found] ` <340ebdaf.230366903@news.mindspring.com>
         [not found]   ` <340ED5D8.2DEF6D3@ux4.sp.cs.cmu.edu>
    1997-09-04  0:00     ` The Red Language Robert Munck
    1997-09-07  0:00       ` Robert Dewar
    1997-09-08  0:00         ` Richard Kenner
    1997-09-12  0:00           ` David Wheeler
    1997-09-12  0:00             ` Robert A Duff
         [not found]     ` <199709051335.PAA25952@basement.replay.com>
    1997-09-05  0:00       ` Dean F. Sutherland
    1997-09-08  0:00         ` Robert A Duff
    1997-09-09  0:00           ` Arthur Evans Jr
         [not found]             ` <dewar.873953300@merv>
    1997-09-11  0:00               ` Robert Dewar
    1997-09-11  0:00                 ` Arthur Evans Jr
    1997-09-12  0:00                   ` Robert A Duff
    1997-09-12  0:00                   ` Robert Dewar
    1997-09-11  0:00                 ` Dean F. Sutherland
    1997-09-12  0:00                   ` Robert A Duff
    1997-09-07  0:00 ` Robert Dewar
    1997-09-08  0:00   ` Tucker Taft
    1997-09-12  0:00 ` Robert A Duff
    1997-09-12  0:00   ` Michael & Amy Hartsough
    1997-09-13  0:00   ` Matthew Heaney
    1997-09-14  0:00     ` Robert A Duff
    1997-09-16  0:00       ` Brian Rogoff
    1997-09-18  0:00         ` Robert A Duff
    1997-09-18  0:00           ` Overload Resolution in Ada (Re: The Red Language) Brian Rogoff
    1997-09-19  0:00             ` Robert Dewar
    1997-09-19  0:00             ` Robert A Duff
    1997-09-19  0:00               ` Brian Rogoff
    1997-09-20  0:00                 ` Robert Dewar
    1997-09-19  0:00           ` The Red Language Robert Dewar
    1997-09-19  0:00             ` Brian Rogoff
    1997-09-19  0:00             ` Robert A Duff
    1997-09-21  0:00               ` Robert Dewar
    1997-09-21  0:00                 ` Algol 68 references (Was Re: The Red Language) Brian Rogoff
    1997-09-22  0:00                   ` Mark L. Fussell
    1997-09-22  0:00                 ` The Red Language Richard Kenner
    1997-09-22  0:00                 ` Chris Morgan
    1997-09-22  0:00                 ` Richard A. O'Keefe
    1997-09-25  0:00                   ` Bruce Link
    1997-09-30  0:00               ` Charles Lindsey
    1997-10-03  0:00                 ` Robert I. Eachus
    1997-09-18  0:00         ` Robert Dewar
    1997-09-18  0:00           ` Robert A Duff
    1997-09-20  0:00             ` Robert Dewar
    1997-09-22  0:00               ` Robert A Duff
    1997-09-18  0:00         ` Robert Dewar
    1997-09-18  0:00           ` Brian Rogoff
    1997-09-16  0:00   ` Brian Rogoff
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox