digitalmars.D - in, out, and inout parameters
- Matthew Gordon (12/12) Mar 02 2005 Have you considered the following perl-inspired syntax for function call...
- Walter (1/1) Mar 02 2005 It's been suggested. Many like it.
- Nick Sabalausky (3/4) Mar 02 2005 Heheh, I take it that means you don't?
-
Walter
(3/8)
Mar 02 2005
I'm not too comfortable with it
. - Lionello Lunesu (3/5) Mar 03 2005 From a compiler programmer point-of-view? (I mean, would it parse terrib...
- Walter (6/10) Mar 09 2005 terribly?)
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...I'm not too comfortable with it <g>.It's been suggested. Many like it.Heheh, I take it that means you don't?
Mar 02 2005
Hi..From a compiler programmer point-of-view? (I mean, would it parse terribly?) L.Heheh, I take it that means you don't?I'm not too comfortable with it <g>.
Mar 03 2005
"Lionello Lunesu" <lio lunesu.removethis.com> wrote in message news:d06ho5$255n$1 digitaldaemon.com...Hi..terribly?) (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.From a compiler programmer point-of-view? (I mean, would it parseHeheh, I take it that means you don't?I'm not too comfortable with it <g>.
Mar 09 2005