Topic: history of inline
Author: "Bill Wade" <bill.wade@stoner.com>
Date: 1997/04/22 Raw View
Eric Gindrup <gindrup@okway.okstate.edu> wrote in article
<33580B4D.3FA2@okway.okstate.edu>...
> Does anyone recall or have a reference as to why the inline keyword
> is used "backwards"? It would appear to be more useful at
> function invocation than at function definition.
Just a guess. Somebody thought
a = b + c;
was more readable than
a inline= b inline+ c;
Also IMHO it is nice to be able to change implementation details (is
operator+() actually defined in the header, or just declared?) without
having to change the source of clients.
---
[ 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: Julian Pardoe <pardoej@lonnds.ml.com>
Date: 1997/04/23 Raw View
Bill Wade wrote:
>
> Eric Gindrup <gindrup@okway.okstate.edu> wrote in article
> <33580B4D.3FA2@okway.okstate.edu>...
> > Does anyone recall or have a reference as to why the inline keyword
> > is used "backwards"? It would appear to be more useful at
> > function invocation than at function definition.
>
> Just a guess. Somebody thought
> a = b + c;
> was more readable than
> a inline= b inline+ c;
>
> Also IMHO it is nice to be able to change implementation details (is
> operator+() actually defined in the header, or just declared?) without
> having to change the source of clients.
How about: the starting point was looking for a way of replacing parameterized
#defines by something better.
I haven't thought about it in depth but I can imagine that there are some
tricky issues about making decisions about inlining at the point of call
(especially if you don't have a very clever linker).
-- jP --
---
[ 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
]