Topic: Conforming compilers should compile STL?
Author: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Date: 1996/03/16 Raw View
mslamm@pluto.mscc.huji.ac.il (Zvi Lamm) writes:
>What version of the STL source is going to be in the standard?
You question indicates some confusion between the standard itself,
which will specify the interface to STL, and implementations of the
standard. The standard itself won't contain any version of the STL source.
Rather, C++ implementations which aim to conform to the standard will
come with some version of the STL source code.
>I ask this since when I asked IBM whether C++/370 will compile the HP STL
>source, I was told to go ahead and check it out myself.
>Now since the compiler is supposed to conform to the proposed standard, I
>thought it MUST compile the STL.
What makes you think that the compiler is supposed to conform to the
proposed standard?
The fact is that there are NO existing compilers which fully conform
to the draft proposed standard. Remember, it is only a draft, and
it is still subject to change. Even when the final version of the
standard is published, I think it will take compiler vendors a while to
produce conforming implementations (or at least almost-conforming --
all sufficiently complex programs contain bugs).
I think currently there may be no existing compilers which are
capable of compiling any version of STL which fully conforms to
the draft standard. So compiler vendors ship with slightly
cut-down implementations of STL, such as the HP version, which do
not quite conform to the draft standard, but which are easier to compile.
Such versions avoid the use of more recently-introduced features such
as template template arguments, default template arguments, and so
forth.
--
Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1996/03/16 Raw View
mslamm@pluto.mscc.huji.ac.il (Zvi Lamm) writes:
>What version of the STL source is going to be in the standard?
None of the currently-available versions of STL are identical
to what is in the draft C++ standard. The final version of STL
will probably require features that few, if any, C++ compilers
currently support. Versions of STL reasonably close to what will
be the standard are currently available (for popular compilers)
from several sources, some commercial, some free. By "reasonably
close" I mean that code using those versions of STL probably
will not need to be changed when compiled against standard-
conforming C++ libraries when those become available. (The
C++ Standard is not yet complete, so no implementation can
accurately claim to be conforming.)
--
Steve Clamage, stephen.clamage@eng.sun.com
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: jdmorris@ix.netcom.com (Jason D. Morris)
Date: 1996/03/17 Raw View
On 16 Mar 96 16:09:58 GMT, David Byrden <goyra@iol.ie> wrote:
>>> This I can understand. But isn't the standard going to include an
>>> implementation of the STL?
>
> Why should it? The whole point of programming languages is that you can
>specify an interface which can be met by many possible implementations.
>
Except for one minor detail. The draft standard also specifies
*performance* requirements for the algorithms and containers in the
STL. So, while not explicitly specifying an implementation, an
implementor's hand will be somewhat forced in terms of choosing an
implementation that meets the performance specs.
Jason
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: gusty@clark.net (Harlan Messinger)
Date: 1996/03/18 Raw View
Ehud Lamm (mslamm@pluto.MSCC.huji.AC.IL) wrote:
: This I can understand. But isn't the standard going to include an
: implementation of the STL?
:
: It seems to me that only specifing the interface can lead to unexpected
: problems.
If users don't make any assumptions about the STL classes and functions
beyond what the interface specifications promise, then, no, there can't be
any unexpected problems, as long as a _correct_ implementation of the
interface is made.
:
: One more question. If the STL is part of the proposed standard, won't
: compiler vendors HAVE to supply some implemenation of it?
There's no law that says vendors have to comply with any standard. But if
they want to sell to that part of the market that expects its purchases
to adhere to the standard, then they will do their best to adhere to the
standard.
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: mslamm%pluto.mscc.huji.ac.il.DECNET@www4.huji.AC.IL
Date: 1996/03/18 Raw View
Relay-Version: ANU News - V6.1B10 04/18/95 OpenVMS AXP; site news.huji.ac.il
Path: pluto.mscc.huji.ac.il!mslamm
Newsgroups: comp.std.c++
Subject: Re: Conforming compilers should compile STL?
Message-ID: <1996Mar17.192336.4195@news.huji.ac.il>
From: mslamm@pluto.mscc.huji.ac.il (Zvi Lamm)
Date: 17 Mar 96 19:23:36 GMT
References: <QQahcw08893.199603150939@relay2.UU.NET> <4ic32v$ah@mulga.cs.mu.OZ.AU>
Distribution: world
Organization: Hebrew University, Jeruslem, Israel
Nntp-Posting-Host: pluto.mscc.huji.ac.il
X-Newsreader: TIN [version 1.2 PL2]
Lines: 27
Fergus Henderson (fjh@mundook.cs.mu.OZ.AU) wrote:
: What makes you think that the compiler is supposed to conform to the
: proposed standard?
Of course it doesn't conform to the standard -as it is still a draft. But
it is rather obvious that being conforming is a goal.
: The fact is that there are NO existing compilers which fully
conform.
: I think currently there may be no existing compilers which are
: capable of compiling any version of STL which fully conforms to
: the draft standard. So compiler vendors ship with slightly
: cut-down implementations of STL, such as the HP version, which do
: not quite conform to the draft standard, but which are easier to compile.
You might have noticed that I asked IBM about exactly this HP source... :-)
: Such versions avoid the use of more recently-introduced features such
: as template template arguments, default template arguments, and so
: forth.
Does there exist a comprehensive list of these "recent" changes needed
for compiling THE STL, or should I try to figure them out myself?
--
Ehud Lamm mslamm@pluto.mscc.huji.ac.il
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: austern@isolde.mti.sgi.com (Matt Austern)
Date: 1996/03/18 Raw View
In article <4ic32v$ah@mulga.cs.mu.OZ.AU> fjh@mundook.cs.mu.OZ.AU (Fergus Hender
son) writes:
> I think currently there may be no existing compilers which are
> capable of compiling any version of STL which fully conforms to
> the draft standard. So compiler vendors ship with slightly
> cut-down implementations of STL, such as the HP version, which do
> not quite conform to the draft standard, but which are easier to compile.
In particular, note that the STL (both the version described in the
original Stepanov-Lee paper and the version described in the ANSI/ISO
committee draft) relies on member templates and on partial
specialization. I don't know of any currently shipping compilers that
support either of those features.
--
Matt Austern
SGI: MTI Compilers Group
austern@isolde.mti.sgi.com
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: jbuck@Synopsys.COM (Joe Buck)
Date: 1996/03/18 Raw View
mslamm@pluto.mscc.huji.ac.il (Zvi Lamm) writes:
>What version of the STL source is going to be in the standard?
No version. The (draft) standard specifies the STL interface; it's up to your
compiler or library vendor to provide source.
>I ask this since when I asked IBM whether C++/370 will compile the HP STL
>source, I was told to go ahead and check it out myself.
The HP STL source is not the standard. It's only an implementation, and
it doesn't include all features specified in the standard since current
compilers can't use those features. Think of it as a sample implementation.
>Now since the compiler is supposed to conform to the proposed standard, I
>thought it MUST compile the STL.
IBM's compiler does not correspond to the draft standard; neither does
anyone else's.
--
-- Joe Buck <jbuck@synopsys.com> (not speaking for Synopsys, Inc)
Work for something because it is good,
not just because it stands a chance to succeed. -- Vaclav Havel
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1996/03/18 Raw View
Ehud Lamm <mslamm@pluto.MSCC.huji.AC.IL> writes:
>But isn't the standard going to include an
>implementation of the STL?
No. The standard doesn't specify implementations of anything.
>It seems to me that only specifing the interface can lead to unexpected
>problems.
The standard also specifies semantic behavior and other requirements.
Implementions may differ in various ways so long as they meet the
requirements that are in the standard. The standard tells you what
behavior you can depend on in portable code.
>As far as I know other parts of the standard library are descirbed with
>the implementation. Or is the implementation I see in magazines just the
>authors fancy?
The standard contains a few examples of partial implementations to
help describe required behavior. These are clearly marked as
"expository only", or as "Examples". Real implementations
are not required to follow the examples as long as the interface
and behavior are correct. You could ask the authors of magazine
articles where their implementations originated; they did not
come from the draft standard.
>One more question. If the STL is part of the proposed standard, won't
>compiler vendors HAVE to supply some implemenation of it?
Yes, in the same sense that they should comply with all parts of
the standard.
--
Steve Clamage, stephen.clamage@eng.sun.com
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]