This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::pow implementation


Alexandre Oliva <aoliva@redhat.com> writes:

| On Jul 30, 2003, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
| 
| > I gave a quote of the purpose of inline in C++.
| 
| There is indeed one obvious use for inline, namely accessor
| functions.  There are several other uses that are not that obvious, in
| which the programmer can't possibly tell whether it's profitable to

Defining a function inline is not a careless action.  If inlining
isn't profitable, the programmer will profile et remove the inline
definition.  You don't know better than the programmer.

[...]

| You're arguing for a definition that was created 20 years ago, against

I'm arguing for a definition that was created 20 yars ago, that still
describes contemporary situations, and more importantly that is part of
the language that was created more than 20 years ago and that is
subject of this discussion.

| one that was come up with after at least 15 years of accumulation of
| experience on the subject,

Yet, we're not at the level of sophistication that will make that
definition obsolete.  And the sade part of the history is that the
evidences that motivated the introduction of "inline" are still
contemporary. 

Please, don't transmute the meaning of "inline".

| just because you see one case in which that
| old definition *might* suit some particular coding style better than
| the new definition, even though, if the new definition is implemented
| correctly, it can't possibly produce worse code?

And the implementation of the "new definition" has always been for the
next version.  Whereas the old definition did and does what it is
designed for.  When you'll reach the state of maturity that makes your 
"new definition" always better than the "old definition", then at time
you may have legitimate reasons and evidences to make the
transmutation.  Not before.  Right now, the only things the "new
definition" offers is lock-in syntaxes.

Please do give "inline" its original meaning.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]