Someone was asking about UFC syntax for properties on d.learn, and I
realized, we have a huge ambiguity here.
Given a function:
@property int foo(int x)
Is this a global setter or a getter on an int?
i.e.
int y = foo = 3;
or
int y = (3).foo;
???
I know arrays have an issue with property
08.10.2010 16:55, Steven Schveighoffer пишет:
Someone was asking about UFC syntax for properties on d.learn, and I
realized, we have a huge ambiguity here.
Given a function:
@property int foo(int x)
Is this a global setter or a getter on an int?
i.e.
int y = foo = 3;
or
int y = (3).foo;
On Fri, 08 Oct 2010 17:26:41 +0400, Stanislav Blinov
wrote:
08.10.2010 16:55, Steven Schveighoffer пишет:
Someone was asking about UFC syntax for properties on d.learn, and I
realized, we have a huge ambiguity here.
Given a function:
@property int foo(int x)
Is this a global setter or
On Fri, 08 Oct 2010 09:30:59 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
C# uses 'this' keyword for that purpose:
@property int set(this int x, int y)
{
x = y;
}
@property int get(this const(int) x)
{
return x;
}
int a = 1;
a.set(42); // a is 42 now
3.set(42); // fails to com
On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
Someone was asking about UFC syntax for properties on d.learn, and I
realized, we have a huge ambiguity here.
Given a function:
@property int foo(int x)
Is this a global setter or a getter on an int?
Good question.
Andrei
08.10.2010 17:46, Steven Schveighoffer пишет:
On Fri, 08 Oct 2010 09:30:59 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
C# uses 'this' keyword for that purpose:
@property int set(this int x, int y)
{
x = y;
}
@property int get(this const(int) x)
{
return x;
}
int a = 1;
a.set
"Steven Schveighoffer" wrote in message
news:op.vj9cunrweav...@localhost.localdomain...
> Someone was asking about UFC syntax for properties on d.learn, and I
> realized, we have a huge ambiguity here.
>
> Given a function:
>
> @property int foo(int x)
>
> Is this a global setter or a getter on
On Friday, October 08, 2010 13:56:14 Nick Sabalausky wrote:
> "Steven Schveighoffer" wrote in message
> news:op.vj9cunrweav...@localhost.localdomain...
>
> > Someone was asking about UFC syntax for properties on d.learn, and I
> > realized, we have a huge ambiguity here.
> >
> > Given a function
"Jonathan M Davis" wrote in message
news:mailman.483.1286572389.858.digitalmar...@puremagic.com...
> On Friday, October 08, 2010 13:56:14 Nick Sabalausky wrote:
>>
>> Additionally, with that understanding in place, this:
>>
>> @property void foo(int x) {...}
>> (3).foo();
>>
>> Is probably the o
On Fri, 08 Oct 2010 16:56:14 -0400, Nick Sabalausky wrote:
Ugh, it seems D still doesn't quite understand the concept of a property.
Here:
@property int foo() // Obviously getter
@property void foo(int x) // Obviously setter
No other form makes any sence as a property. Frankly, I'm very su
On 10/9/10 13:33 CDT, Steven Schveighoffer wrote:
On Fri, 08 Oct 2010 16:56:14 -0400, Nick Sabalausky wrote:
Ugh, it seems D still doesn't quite understand the concept of a property.
Here:
@property int foo() // Obviously getter
@property void foo(int x) // Obviously setter
No other form ma
On 10/9/10 13:33 CDT, Steven Schveighoffer wrote:
On Fri, 08 Oct 2010 16:56:14 -0400, Nick Sabalausky wrote:
Ugh, it seems D still doesn't quite understand the concept of a property.
Here:
@property int foo() // Obviously getter
@property void foo(int x) // Obviously setter
No other form ma
On Sat, 09 Oct 2010 23:37:51 +0400, Andrei Alexandrescu
wrote:
On 10/9/10 13:33 CDT, Steven Schveighoffer wrote:
On Fri, 08 Oct 2010 16:56:14 -0400, Nick Sabalausky wrote:
Ugh, it seems D still doesn't quite understand the concept of a
property.
Here:
@property int foo() // Obviously
Andrei Alexandrescu wrote:
> On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
>> Someone was asking about UFC syntax for properties on d.learn, and I
>> realized, we have a huge ambiguity here.
>>
>> Given a function:
>>
>> @property int foo(int x)
>>
>> Is this a global setter or a getter on a
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly
wrote:
Andrei Alexandrescu wrote:
On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
Someone was asking about UFC syntax for properties on d.learn, and I
realized, we have a huge ambiguity here.
Given a function:
@property int foo(int x)
Is t
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly
wrote:
Andrei Alexandrescu wrote:
On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
Someone was asking about UFC syntax for properties on d.learn, and I
realized,
On Sun, 10 Oct 2010 05:58:00 +0400, Robert Jacques
wrote:
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly
wrote:
Andrei Alexandrescu wrote:
On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
Someone was ask
On Sat, 09 Oct 2010 22:03:56 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 05:58:00 +0400, Robert Jacques
wrote:
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly
wrote:
Andrei Alexa
On Sun, 10 Oct 2010 08:44:59 +0400, Robert Jacques
wrote:
On Sat, 09 Oct 2010 22:03:56 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 05:58:00 +0400, Robert Jacques
wrote:
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 1
On Sun, 10 Oct 2010 00:58:39 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 08:44:59 +0400, Robert Jacques
wrote:
On Sat, 09 Oct 2010 22:03:56 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 05:58:00 +0400, Robert Jacques
wrote:
On Sat, 0
On Sat, 09 Oct 2010 21:58:00 -0400, Robert Jacques
wrote:
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly
wrote:
Andrei Alexandrescu wrote:
On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
Someone was ask
On Wed, 13 Oct 2010 14:34:14 -0400, Steven Schveighoffer
wrote:
On Sat, 09 Oct 2010 21:58:00 -0400, Robert Jacques
wrote:
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly
wrote:
Andrei Alexandrescu wrote:
On Wed, 13 Oct 2010 20:57:54 -0400, Robert Jacques
wrote:
On Wed, 13 Oct 2010 14:34:14 -0400, Steven Schveighoffer
wrote:
Because then we are back to writeln = 42;
-Steve
:) I see that despite not valid code for what, over a year now?, writeln
= 42 still persists.
IMO, that's becaus
On Thu, 14 Oct 2010 09:42:34 -0400, Steven Schveighoffer
wrote:
On Wed, 13 Oct 2010 20:57:54 -0400, Robert Jacques
wrote:
On Wed, 13 Oct 2010 14:34:14 -0400, Steven Schveighoffer
wrote:
Because then we are back to writeln = 42;
-Steve
:) I see that despite not valid code for what,
On Thu, 14 Oct 2010 20:28:45 -0400, Robert Jacques
wrote:
First, to avoid confusion, I'd like to separate inappropriate usage at
the binary level from textual/syntax level. For example, casting,
compile-time reflection and .tupleof are all ways to circumvent the
fundamental restrictions
On Thu, 14 Oct 2010 22:22:19 -0400, Steven Schveighoffer
wrote:
On Thu, 14 Oct 2010 20:28:45 -0400, Robert Jacques
wrote:
First, to avoid confusion, I'd like to separate inappropriate usage at
the binary level from textual/syntax level. For example, casting,
compile-time reflection an
26 matches
Mail list logo