"Andrei Alexandrescu" wrote in message
news:h5vtj8$1l7...@digitalmars.com...
Lionello Lunesu wrote:
"Andrei Alexandrescu" wrote in message
news:h5ttfi$cf...@digitalmars.com...
Lionello Lunesu wrote:
"Jeremie Pelletier" wrote in message
news:h5sl4c$173...@digitalmars.com...
It's especi
Lionello Lunesu wrote:
"Andrei Alexandrescu" wrote in message
news:h5ttfi$cf...@digitalmars.com...
Lionello Lunesu wrote:
"Jeremie Pelletier" wrote in message
news:h5sl4c$173...@digitalmars.com...
It's especially bad since if you modify the function prototype and
change ref, you have all
"Andrei Alexandrescu" wrote in message
news:h5ttfi$cf...@digitalmars.com...
Lionello Lunesu wrote:
"Jeremie Pelletier" wrote in message
news:h5sl4c$173...@digitalmars.com...
It's especially bad since if you modify the function prototype and
change ref, you have all your calls to update to
Andrei Alexandrescu escribió:
Lionello Lunesu wrote:
"Jeremie Pelletier" wrote in message
news:h5sl4c$173...@digitalmars.com...
It's especially bad since if you modify the function prototype and
change ref, you have all your calls to update too.
That must be the best argument to introduce
Lionello Lunesu escribió:
"Jeremie Pelletier" wrote in message
news:h5sl4c$173...@digitalmars.com...
It's especially bad since if you modify the function prototype and
change ref, you have all your calls to update too.
That must be the best argument to introduce repeating ref and out!
No,
Lionello Lunesu wrote:
"Jeremie Pelletier" wrote in message
news:h5sl4c$173...@digitalmars.com...
It's especially bad since if you modify the function prototype and
change ref, you have all your calls to update too.
That must be the best argument to introduce repeating ref and out!
L.
//
"Jeremie Pelletier" wrote in message
news:h5sl4c$173...@digitalmars.com...
It's especially bad since if you modify the function prototype and change
ref, you have all your calls to update too.
That must be the best argument to introduce repeating ref and out!
L.
"Jeremie Pelletier" wrote in message
news:h5sl4c$173...@digitalmars.com...
> Ary Borenszweig Wrote:
>
> It's especially bad since if you modify the function prototype and change
> ref, you have all your calls to update too.
I'd consider that a benefit. If I have a function:
void foo(int x)
{
"Jarrett Billingsley" wrote in message
news:mailman.329.1250026310.14071.digitalmar...@puremagic.com...
> On Tue, Aug 11, 2009 at 4:05 PM, Nick Sabalausky wrote:
>> Although, what some people have said about just coloring it in an editor
>> is
>> not a bad point (althogh it seems like we may be
Ary Borenszweig Wrote:
> In C# when you define a function that takes an out or ref parameter,
> when invoking that function you must also specify ref or out. For example:
>
> void fun(ref uint x, double y);
>
> uint a = 1;
> double b = 2;
> fun(ref a, b);
>
> What do you think?
I agree
On Tue, Aug 11, 2009 at 4:05 PM, Nick Sabalausky wrote:
> Although, what some people have said about just coloring it in an editor is
> not a bad point (althogh it seems like we may be starting to run out of
> colors...).
If your syntax highlighting is using so many colors that you're
worried abou
Ary Borenszweig Wrote:
> In C# when you define a function that takes an out or ref parameter,
> when invoking that function you must also specify ref or out. For example:
>
> void fun(ref uint x, double y);
>
> uint a = 1;
> double b = 2;
> fun(ref a, b);
>
> When I first started using C# it r
On Tue, Aug 11, 2009 at 04:28:06PM -0400, bearophile wrote:
> There's an intermediate solution, to make "ref" optional at the calling site
> (as in the "override" case). I don't know how much this can improve the
> situation.
That seems to me to defeat the point, since you can't rely on it anymo
BCS Wrote:
> It would make template programming harder.
>
> template TplFn(alias fn)
> {
> void TplFn(T...)(T t)
> {
> fn(t); // what if fn has normal, ref and out args?
> }
> }
There's an intermediate solution, to make "ref" optional at the calling site
(as in the "override"
On Tue, 11 Aug 2009 15:47:15 -0400, Michiel Helvensteijn
wrote:
Ary Borenszweig wrote:
In C# when you define a function that takes an out or ref parameter,
when invoking that function you must also specify ref or out. For
example:
void fun(ref uint x, double y);
uint a = 1;
double b =
On Tue, Aug 11, 2009 at 12:47 PM, Michiel
Helvensteijn wrote:
> Ary Borenszweig wrote:
>
>> In C# when you define a function that takes an out or ref parameter,
>> when invoking that function you must also specify ref or out. For example:
>>
>> void fun(ref uint x, double y);
>>
>> uint a = 1;
>> d
On Tue, Aug 11, 2009 at 1:05 PM, Nick Sabalausky wrote:
> "Ary Borenszweig" wrote in message
> news:h5s3e9$2km...@digitalmars.com...
>> In C# when you define a function that takes an out or ref parameter, when
>> invoking that function you must also specify ref or out. For example:
>>
>> void fun(
"Ary Borenszweig" wrote in message
news:h5s3e9$2km...@digitalmars.com...
> In C# when you define a function that takes an out or ref parameter, when
> invoking that function you must also specify ref or out. For example:
>
> void fun(ref uint x, double y);
>
> uint a = 1;
> double b = 2;
> fun(r
Ary Borenszweig wrote:
> In C# when you define a function that takes an out or ref parameter,
> when invoking that function you must also specify ref or out. For example:
>
> void fun(ref uint x, double y);
>
> uint a = 1;
> double b = 2;
> fun(ref a, b);
>
> What do you think?
I see what you
On Tue, Aug 11, 2009 at 11:40 AM, Ary Borenszweig wrote:
> In C# when you define a function that takes an out or ref parameter, when
> invoking that function you must also specify ref or out. For example:
>
> void fun(ref uint x, double y);
>
> uint a = 1;
> double b = 2;
> fun(ref a, b);
>
> When
Ary Borenszweig Wrote:
> In C# when you define a function that takes an out or ref parameter,
> when invoking that function you must also specify ref or out. For example:
>
> void fun(ref uint x, double y);
>
> uint a = 1;
> double b = 2;
> fun(ref a, b);
>
> When I first started using C# it r
Ary Borenszweig wrote:
In C# when you define a function that takes an out or ref parameter,
when invoking that function you must also specify ref or out. For example:
void fun(ref uint x, double y);
uint a = 1;
double b = 2;
fun(ref a, b);
When I first started using C# it really annoyed me th
Reply to Ary,
In C# when you define a function that takes an out or ref parameter,
when invoking that function you must also specify ref or out. For
example:
void fun(ref uint x, double y);
uint a = 1;
double b = 2;
fun(ref a, b);
When I first started using C# it really annoyed me that I had t
Ary Borenszweig:
> What do you think?
I don't know. It's a different design choice. Generally explicit is better and
safer, but I don't know much safer this is. Overall I think the C# choice here
is a bit better, but you have to write lot of code before being able to tell C#
has chosen for the
Ary Borenszweig wrote:
> In C# when you define a function that takes an out or ref parameter,
> when invoking that function you must also specify ref or out. For example:
>
> void fun(ref uint x, double y);
>
> uint a = 1;
> double b = 2;
> fun(ref a, b);
>
> When I first started using C# it re
In C# when you define a function that takes an out or ref parameter,
when invoking that function you must also specify ref or out. For example:
void fun(ref uint x, double y);
uint a = 1;
double b = 2;
fun(ref a, b);
When I first started using C# it really annoyed me that I had to put
that ke
26 matches
Mail list logo