Re: In-Out Parameters for functions
From: Hyman Rosen (hyrosen_at_mail.com)
Date: 02/24/04
- Previous message: Hyman Rosen: "Re: In-Out Parameters for functions"
- In reply to: Stuart Palin: "Re: In-Out Parameters for functions"
- Next in thread: David Starner: "Re: In-Out Parameters for functions"
- Reply: David Starner: "Re: In-Out Parameters for functions"
- Reply: Jacob Sparre Andersen: "Re: In-Out Parameters for functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 Feb 2004 01:55:41 GMT
Stuart Palin wrote:
> ... allowing compilers to find an optimal implementation order!???
But as you go on to quote me, the cases where the compiler would not
be permitted to do this are relatively rare, and involve the presence
of multiple function calls within an expression. In such a case, how
much optimization will operand reordering buy?
>>>- including concurrent computation.
Where does Ada permit the concurrent execution of multiple function
calls of an expression?
> if the rules you introduce are too complex the cure is worse
> than the disease.
Fortunately, the rules I introduce are not.
> There is some merit in having a set of rules that are perhaps
> imperfect, but are simpler to understand: at least you are sure
> of where you stand.
Yes, that's what my rules would accomplish. There are many people
who are astonished to realize that in
a := f(a(0)) + g(b(1));
the only constraints are that a is called before f and b before g,
but nothing else is required, so that six orders are possible:
abfg abgf afbg bafg bagf bgaf
> XY := doublet'(x => a+b, y => c+d);
>
> If they are truly unconnected objects then perhaps they
> should be processed in separate tasks.
I will leave it to the people who describe Ada code as readeable to
tell me whether turning a sequence of assignments into an aggregate
or a pair of tasks is a good idea.
- Previous message: Hyman Rosen: "Re: In-Out Parameters for functions"
- In reply to: Stuart Palin: "Re: In-Out Parameters for functions"
- Next in thread: David Starner: "Re: In-Out Parameters for functions"
- Reply: David Starner: "Re: In-Out Parameters for functions"
- Reply: Jacob Sparre Andersen: "Re: In-Out Parameters for functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]