digitalmars.D - in, out, and inout parameters
- Matthew Gordon <Matthew_member pathlink.com> Mar 02 2005
- "Walter" <newshound digitalmars.com> Mar 02 2005
- "Nick Sabalausky" <z a.a> Mar 02 2005
- "Walter" <newshound digitalmars.com> Mar 02 2005
- "Lionello Lunesu" <lio lunesu.removethis.com> Mar 03 2005
- "Walter" <newshound digitalmars.com> Mar 09 2005
Have you considered the following perl-inspired syntax for function calls: ( d, e ) = foo( a, b, c ); Where a,b,c are in parameters and d, e are out parameters? Inout parameters would not be needed because you could just write: ( b, c ) = foo( a, b ); This effectively makes b inout. This is effectively returning a struct from the function, but saves needing a separate declaration. This style of syntax makes it clear which functions are in and out but putting the out parameters on the other side of the assignment opperator.
Mar 02 2005
"Walter" <newshound digitalmars.com> wrote in message news:d05nki$1ads$2 digitaldaemon.com...It's been suggested. Many like it.
Heheh, I take it that means you don't?
Mar 02 2005
"Nick Sabalausky" <z a.a> wrote in message news:d05um4$1gcn$1 digitaldaemon.com..."Walter" <newshound digitalmars.com> wrote in message news:d05nki$1ads$2 digitaldaemon.com...It's been suggested. Many like it.
Heheh, I take it that means you don't?
I'm not too comfortable with it <g>.
Mar 02 2005
Hi..Heheh, I take it that means you don't?
From a compiler programmer point-of-view? (I mean, would it parse terribly?) L.
Mar 03 2005
"Lionello Lunesu" <lio lunesu.removethis.com> wrote in message news:d06ho5$255n$1 digitaldaemon.com...Hi..Heheh, I take it that means you don't?
From a compiler programmer point-of-view? (I mean, would it parse
(exp, exp) already has a meaning in D, and this would change that in a context, dependent way. Not impossible, but kinda kludgy. I also just can't escape a wince looking at it. It just doesn't look right.
Mar 09 2005








"Walter" <newshound digitalmars.com>