C++ vs Lisp

Nick Sabalausky a at a.a
Sat May 17 17:32:09 PDT 2008


"Dee Girl" <deegirl at noreply.com> wrote in message 
news:g0noqa$2rpf$1 at digitalmars.com...
> There was long discussion here. Maybe you did not read.
>

Didn't see it, must have been on a different thread.

> void slowbad(delegate void() f)
> {
>    f();
> }
>
> void fastgood(alias f)()
> {
>    f();
> }
>
> void main()
> {
>    void f() { }
>    slowbad(&f);
>    fastgood!(f);
> }
>
> Syntax is different but power is very different. std.algorithm uses alias 
> always. Everybody else uses slowbad ^_^ Dee Girl

Isn't that akin to forcing a function to be inlined? It sounds to me like, 
just as with normal function inlining, there are cases where that could 
backfire because of things like increased cache misses or increased register 
consumption (or are those outdated problems with inlining?). 





More information about the Digitalmars-d mailing list