www.digitalmars.com         C & C++   DMDScript  

D - [VOTE]: Should the 'in/out/inout' parameter modifiers be changed to 'ref'

reply imr1984 <imr1984_member pathlink.com> writes:
change the score when you reply:

Aye: 1
Nay: 0
Mar 17 2004
next sibling parent reply Jon <Jon_member pathlink.com> writes:
In article <c3a1bu$2j8v$1 digitaldaemon.com>, imr1984 says...
change the score when you reply:

Aye: 1
Nay: 0
Aye: 1 Nay: 1 -Jon
Mar 17 2004
parent reply C <dont respond.com> writes:
On Wed, 17 Mar 2004 17:36:23 +0000 (UTC), Jon <Jon_member pathlink.com> 
wrote:

synchronized {

  Aye: 1
  Nay: 2

}



 In article <c3a1bu$2j8v$1 digitaldaemon.com>, imr1984 says...
 change the score when you reply:

 Aye: 1
 Nay: 0
Aye: 1 Nay: 1 -Jon
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Mar 17 2004
next sibling parent Ilya Minkov <minkov cs.tum.edu> writes:
Aye: 1
Nay: 668

(i'm playing foreign games by my own rules and vote multiple times)

If they are changed, we will severely compromise the performance 
scalability of D to different systems! They will prove *very* useful as 
they are defined in a few years.

-eye


C schrieb:
 On Wed, 17 Mar 2004 17:36:23 +0000 (UTC), Jon <Jon_member pathlink.com> 
 wrote:
 
 synchronized {
 
  Aye: 1
  Nay: 2
 
 }
Mar 17 2004
prev sibling parent reply Andrew Edwards <remove_ridimz remove_yahoo.com> writes:
On Wed, 17 Mar 2004 11:58:03 -0800, C <dont respond.com> wrote:

 On Wed, 17 Mar 2004 17:36:23 +0000 (UTC), Jon <Jon_member pathlink.com> 
 wrote:

 synchronized {

   Aye: 1
   Nay: 2

 }
Aye: 1 Nay: 3
Mar 17 2004
parent reply "Matthew" <matthew stlsoft.org> writes:
I have to say nay, because I don't understand the point of the proposal.
Please explain.

synchronized
{
 Aye: 1
 Nay: 4
}

"Andrew Edwards" <remove_ridimz remove_yahoo.com> wrote in message
news:opr40tpklzs6zaqn news.digitalmars.com...
 On Wed, 17 Mar 2004 11:58:03 -0800, C <dont respond.com> wrote:

 On Wed, 17 Mar 2004 17:36:23 +0000 (UTC), Jon <Jon_member pathlink.com>
 wrote:

 synchronized {

   Aye: 1
   Nay: 2

 }
Aye: 1 Nay: 3
Mar 17 2004
next sibling parent J C Calvarese <jcc7 cox.net> writes:
No.

synchronized
{
   Aye: 1
   Nay: 5
}

I don't know what it is, but I doubt I'd like it.

-- 
Justin
http://jcc_7.tripod.com/d/
Mar 17 2004
prev sibling parent TuNam <TuNam_member pathlink.com> writes:
No man . Vote for No.
syncronized
{
Aye : 1
Nay : 5 
}
As I know , in for pass by value , in out for pass by reference , and out is
needed for C++ /even Java still need -> D must keep it .( please anyone explain
Pass reference by Value I really don't understand about term name
Pass-Reference-By-Value in Java ).
In article <c3a9ch$7c$2 digitaldaemon.com>, Matthew says...
I have to say nay, because I don't understand the point of the proposal.
Please explain.

synchronized
{
 Aye: 1
 Nay: 4
}

"Andrew Edwards" <remove_ridimz remove_yahoo.com> wrote in message
news:opr40tpklzs6zaqn news.digitalmars.com...
 On Wed, 17 Mar 2004 11:58:03 -0800, C <dont respond.com> wrote:

 On Wed, 17 Mar 2004 17:36:23 +0000 (UTC), Jon <Jon_member pathlink.com>
 wrote:

 synchronized {

   Aye: 1
   Nay: 2

 }
Aye: 1 Nay: 3
Mar 17 2004
prev sibling next sibling parent reply Vathix <vathix dprogramming.com> writes:
imr1984 wrote:

 change the score when you reply:
 
 Aye: 1
 Nay: 0
 
 
in/out/inout aid the programmer and possibly allow optimizations. But sometimes you only need an input or output reference depending on runtime values, that's there ref would come in handy. I think it would be nice to add it. -- Christopher E. Miller
Mar 17 2004
next sibling parent reply Ilya Minkov <minkov cs.tum.edu> writes:
Vathix schrieb:

 in/out/inout aid the programmer and possibly allow optimizations. But 
 sometimes you only need an input or output reference depending on 
 runtime values, that's there ref would come in handy. I think it would 
 be nice to add it.
I simply don't get it what for??? We have inout. We have pointer. What else would be ref but an alias to inout???? -eye
Mar 17 2004
parent Vathix <vathix dprogramming.com> writes:
Ilya Minkov wrote:

 Vathix schrieb:
 
 in/out/inout aid the programmer and possibly allow optimizations. But 
 sometimes you only need an input or output reference depending on 
 runtime values, that's there ref would come in handy. I think it would 
 be nice to add it.
I simply don't get it what for??? We have inout. We have pointer. What else would be ref but an alias to inout???? -eye
I thought with out and inout the function is forced to set the value, with ref (as a safe alternative to a pointer) you could do it based on runtime values. Sorry, I guess I'm wrong. -- Christopher E. Miller
Mar 19 2004
prev sibling parent =?ISO-8859-1?Q?Sigbj=F8rn_Lund_Olsen?= <sigbjorn lundolsen.net> writes:
Vathix wrote:

 imr1984 wrote:
 
 change the score when you reply:

 Aye: 1
 Nay: 0
in/out/inout aid the programmer and possibly allow optimizations. But sometimes you only need an input or output reference depending on runtime values, that's there ref would come in handy. I think it would be nice to add it.
And therefore ... "inout"! *...and the crowd gasped in amazement* Cheers, Sigbjørn Lund Olsen
Mar 19 2004
prev sibling next sibling parent "Derek Parnell" <Derek.Parnell psyc.ward> writes:
On Wed, 17 Mar 2004 17:19:58 +0000 (UTC) (18/Mar/04 04:19:58 AM)
, imr1984 <imr1984_member pathlink.com> wrote:

 change the score when you reply:

 Aye: 1
 Nay: 0
My vote: No. Reasons: (a) 'in', 'out', and 'inout' all mean different things and a single 'ref' keyword cannot replace all their meanings. (b) By using explicit keywords, the intentions of the coder are more obvious to the reader. (c) Using keywords for each case makes the code more 'grepable'. -- Derek
Mar 17 2004
prev sibling next sibling parent J Anderson <REMOVEanderson badmama.com.au> writes:
imr1984 wrote:

change the score when you reply:

Aye: 1
Nay: 0


  
Nay reference is a C++ thing. In/out is much better. -- -Anderson: http://badmama.com.au/~anderson/
Mar 18 2004
prev sibling next sibling parent =?ISO-8859-1?Q?Sigbj=F8rn_Lund_Olsen?= <sigbjorn lundolsen.net> writes:
imr1984 wrote:

 change the score when you reply:
 
 Aye: 1
 Nay: 0
 
 
No. in/out/inout are completely descriptive as to what they can be used for, while 'ref' only tells you what the parameter *is*. Essentially, in/out/inout leads to higher clarity in code. The only good cause for 'ref', as I can see it, is similarity to other languages. That, alone, should never be enough. Cheers, Sigbjørn Lund Olsen
Mar 19 2004
prev sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Aye: 1
Nay: 6

However, I do miss the constant reference from C++.

Stewart.

-- 
My e-mail is valid but not my primary mailbox, aside from its being the 
unfortunate victim of intensive mail-bombing at the moment.  Please keep 
replies on the 'group where everyone may benefit.
Mar 22 2004
parent reply "Matthew" <matthew stlsoft.org> writes:
As do I, but it's a no-dicer. DBC helps a lot, but it's still doing runtime
checks for compile violations.

But I am prepared to defer to Walter's wisdom that the benefit is not worth
the cost, and focus on other things. :)


"Stewart Gordon" <smjg_1998 yahoo.com> wrote in message
news:c3mdfj$21cp$1 digitaldaemon.com...
 Aye: 1
 Nay: 6

 However, I do miss the constant reference from C++.

 Stewart.

 -- 
 My e-mail is valid but not my primary mailbox, aside from its being the
 unfortunate victim of intensive mail-bombing at the moment.  Please keep
 replies on the 'group where everyone may benefit.
Mar 22 2004
parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
Matthew wrote:

As do I, but it's a no-dicer. DBC helps a lot, but it's still doing runtime
checks for compile violations.

But I am prepared to defer to Walter's wisdom that the benefit is not worth
the cost, and focus on other things. :)
  
I'm undecided about the const issue. It gets really hairy when your forced to use constant functions (ie in function pointers from some other library) when u shouldn't be and then can't call anything else but constant functions (which of course excludes much of c's stl -> many of which could have constant behaviour). Many people don't follow the convention because of issues such as this one which makes the problem worse. -- -Anderson: http://badmama.com.au/~anderson/
Mar 22 2004
parent "Matthew" <matthew stlsoft.org> writes:
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:c3n4ol$5sk$1 digitaldaemon.com...
 Matthew wrote:

As do I, but it's a no-dicer. DBC helps a lot, but it's still doing
runtime
checks for compile violations.

But I am prepared to defer to Walter's wisdom that the benefit is not
worth
the cost, and focus on other things. :)
I'm undecided about the const issue. It gets really hairy when your forced to use constant functions (ie in function pointers from some other library) when u shouldn't be and then can't call anything else but constant functions (which of course excludes much of c's stl -> many of which could have constant behaviour). Many people don't follow the convention because of issues such as this one which makes the problem
worse. I'll have to take your word (and that of many other commentators) for it. I've never had any problem with const, and I've never worked with anyone that had any problem with it either. I am still unable to understand what all the fuss is about, and I simply think const is great.
Mar 22 2004