Clive Page wrote:
>
> On Thu, 13 Nov 1997, Malcolm Cohen wrote:
>
> > Name mangling is not a panacea. You end up with increased cost,
> > undocumented restrictions, or a cruddier environment. In particular,
> > every tool that might mention the name to the user really needs to be
> > changed... which includes most of my list! QED.
>
> In addition, if you try to combine C++ with Fortran or another fine
> language you find that the combination is less portable, because different
> systems have different conventions for name-mangling.
A statement about my (religious) beliefs on the core subject of this
discussion: I *believe* that the language definition should not contain
any restrictions like maximum procedure name length, maximum source
line length or maximum number of continuation lines, etc. If absolutely
necessary, those restrictions should be so far beyone the limits of any
sensible programming practice that they would never stand in the way of
practical needs.
Now, my $0.02
AFAIK there are some as yet vague plans to incorporate some form of
procedure argument genericity (with respect to kind or even type of
arguments). This *may* lead to name mangling. And if name mangling
should prove to be unavoidable, the standard committee will have to
think hard how to make it work and not prove it unsable. C++ is
an example of *bad* name mangling because it causes many problems.
It should be learned from and not used as an excuse not to do it
at all.
I happen to believe that the name mangling conventions should be
standardized. The standard should cover at least Fortran name mangling,
but it would be nice if it made an effort to cover also C++ (as well as
other languages).
The most painful problem with name mangling that comes to my mind is
not the cost of implementation of all the tools. After all many (most?)
Fortran vendors also develop and sell C++ and so have already solved
this problems once.
But with non-standard name mangling it becomes impossible to interface
subroutines compiled with different compilers even if you're using
the same language. You can't distribute C++ binary libraries without
having separate versions for different compilers.
BTW, procedure argument genericity with respect to kind/type will
pose many additional problems when it comes to portability,
connectivity with other languages etc. But I think this problem
should be faced and solved and not just claimed to difficult.
Regards,
----------------------------------------------------------------------
Artur Swietanowski mailto:[log in to unmask]
Institut fuer Statistik, Operations Research und Computerverfahren,
Universitaet Wien, Universitaetsstr. 5, A-1010 Wien, Austria
tel. +43 (1) 407 63 55 - 120 fax +43 (1) 406 41 59
----------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|