Nevermind properties. Any chance we can forbid the omittable
parentheses, at least in the lhs of an assignment expression?
In the more general case, any value type that gets modified but never
read or copied elsewhere is probably either dead code, a bug, or a
benchmark. The latter is easy to fix
"Chad J" wrote in message
news:gut0f2$jc...@digitalmars.com...
Nevermind properties. Any chance we can forbid the omittable
parentheses, at least in the lhs of an assignment expression?
In the more general case, any value type that gets modified but never
read or copied elsewhere is probably
Lionello Lunesu wrote:
>
> "Chad J" wrote in message
> news:gut0f2$jc...@digitalmars.com...
>> Nevermind properties. Any chance we can forbid the omittable
>> parentheses, at least in the lhs of an assignment expression?
>>
>> In the more general case, any value type that gets modified but never
== Quote from Chad J (chadj...@__spam.is.bad__gmail.com)'s article
> Lionello Lunesu wrote:
> >
> > "Chad J" wrote in message
> > news:gut0f2$jc...@digitalmars.com...
> >> Nevermind properties. Any chance we can forbid the omittable
> >> parentheses, at least in the lhs of an assignment expressio
"Chad J" wrote in message
news:gut1od$l5...@digitalmars.com...
> Lionello Lunesu wrote:
>>
>> "Chad J" wrote in message
>> news:gut0f2$jc...@digitalmars.com...
>>> Nevermind properties. Any chance we can forbid the omittable
>>> parentheses, at least in the lhs of an assignment expression?
>>>
Hello dsimcha,
== Quote from Chad J (chadj...@__spam.is.bad__gmail.com)'s article
Lionello Lunesu wrote:
"Chad J" wrote in message
news:gut0f2$jc...@digitalmars.com...
Nevermind properties. Any chance we can forbid the omittable
parentheses, at least in the lhs of an assignment expressio
dsimcha wrote:
>
> Yeah, file a Bugzilla. Shouldn't ++, +=, etc. only work on lvalues?
*shrug*
http://d.puremagic.com/issues/show_bug.cgi?id=3008
Chad J wrote:
dsimcha wrote:
Yeah, file a Bugzilla. Shouldn't ++, +=, etc. only work on lvalues?
*shrug*
http://d.puremagic.com/issues/show_bug.cgi?id=3008
Voted up!
Andrei
On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
> "Chad J" wrote in message
> news:gut1od$l5...@digitalmars.com...
>> Lionello Lunesu wrote:
>>>
>>> "Chad J" wrote in message
>>> news:gut0f2$jc...@digitalmars.com...
Nevermind properties. Any chance we can forbid the omittable
>>
Jesse Phillips escribió:
On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
"Chad J" wrote in message
news:gut1od$l5...@digitalmars.com...
Lionello Lunesu wrote:
"Chad J" wrote in message
news:gut0f2$jc...@digitalmars.com...
Nevermind properties. Any chance we can forbid the omitt
"Jesse Phillips" wrote in message
news:gutbro$14e...@digitalmars.com...
> On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
>>
>> I still want to get rid of omittable parens (and function-call-as-a-lhs)
>> anyway. They're a horrible substitute for a real property syntax.
>
> I don't like
Nick Sabalausky wrote:
> D leaves the function/property distinction up to the caller, which is
> rediculous because in most cases only one or the other actually makes sense.
I totally agree with this.
> C# places the responsilibily for that function-syntax/property-syntax choice
> on the calle
On Tue, 19 May 2009 05:53:06 +0400, Nick Sabalausky wrote:
> "Chad J" wrote in message
> news:gut1od$l5...@digitalmars.com...
>> Lionello Lunesu wrote:
>>>
>>> "Chad J" wrote in message
>>> news:gut0f2$jc...@digitalmars.com...
Nevermind properties. Any chance we can forbid the omittable
>
On Tue, 19 May 2009 00:29:17 -0400, Ary Borenszweig
wrote:
Jesse Phillips escribió:
On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
"Chad J" wrote in message
news:gut1od$l5...@digitalmars.com...
Lionello Lunesu wrote:
"Chad J" wrote in message
news:gut0f2$jc...@digitalmars.c
On Tue, May 19, 2009 at 1:15 AM, Nick Sabalausky wrote:
> "Jesse Phillips" wrote in message
> news:gutbro$14e...@digitalmars.com...
>> On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
>>>
>>> I still want to get rid of omittable parens (and function-call-as-a-lhs)
>>> anyway. They're a
Steven Schveighoffer, el 19 de mayo a las 09:54 me escribiste:
> >So for me, properties are way more than just syntax sugar.
>
> AFAIK, this is not enforced by the compiler...
>
> I write C# properties that have side effects.
Well, in D2 it would make sense to make mandatory that properties are
Leandro Lucarella wrote:
> Steven Schveighoffer, el 19 de mayo a las 09:54 me escribiste:
>>> So for me, properties are way more than just syntax sugar.
>> AFAIK, this is not enforced by the compiler...
>>
>> I write C# properties that have side effects.
>
> Well, in D2 it would make sense to mak
On Tue, 19 May 2009 11:12:13 -0300, Leandro Lucarella wrote:
>
> class C
> {
> int no_prop() { return 1; }
> property int prop() { return 2; }
> }
>
> C c = new C;
> int x = c.no_prop; // error
> x = x.prop; // ok
>
> "property" should imply "pure".
I actually wouldn't have an issu
On Tue, May 19, 2009 at 10:12 AM, Leandro Lucarella wrote:
> Steven Schveighoffer, el 19 de mayo a las 09:54 me escribiste:
>> >So for me, properties are way more than just syntax sugar.
>>
>> AFAIK, this is not enforced by the compiler...
>>
>> I write C# properties that have side effects.
>
> We
On Tue, 19 May 2009 10:12:13 -0400, Leandro Lucarella
wrote:
Steven Schveighoffer, el 19 de mayo a las 09:54 me escribiste:
>So for me, properties are way more than just syntax sugar.
AFAIK, this is not enforced by the compiler...
I write C# properties that have side effects.
Well, in D2
Steven Schveighoffer wrote:
On Tue, 19 May 2009 00:29:17 -0400, Ary Borenszweig
wrote:
Jesse Phillips escribió:
On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
"Chad J" wrote in message
news:gut1od$l5...@digitalmars.com...
Lionello Lunesu wrote:
"Chad J" wrote in message
new
Leandro Lucarella wrote:
Steven Schveighoffer, el 19 de mayo a las 09:54 me escribiste:
So for me, properties are way more than just syntax sugar.
AFAIK, this is not enforced by the compiler...
I write C# properties that have side effects.
Well, in D2 it would make sense to make mandatory th
Jarrett Billingsley, el 19 de mayo a las 11:31 me escribiste:
> On Tue, May 19, 2009 at 10:12 AM, Leandro Lucarella wrote:
> > Steven Schveighoffer, el 19 de mayo a las 09:54 me escribiste:
> >> >So for me, properties are way more than just syntax sugar.
> >>
> >> AFAIK, this is not enforced by th
How the hell do you write a pure setter?
Ok, "almost pure" =P
You should be able to modify "this", of course.
Properties could be automatically marked as const. Then a setter would
not be allowed to change anything, except members explicitly marked with
a "mutable" attribute.
Oh wait, tha
On Tue, 19 May 2009 13:32:35 -0400, Ary Borenszweig
wrote:
Steven Schveighoffer wrote:
On Tue, 19 May 2009 00:29:17 -0400, Ary Borenszweig
wrote:
Jesse Phillips escribió:
On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
"Chad J" wrote in message
news:gut1od$l5...@digitalma
Chad J wrote:
Nevermind properties. Any chance we can forbid the omittable
parentheses, at least in the lhs of an assignment expression?
In the more general case, any value type that gets modified but never
read or copied elsewhere is probably either dead code, a bug, or a
benchmark. The latte
Reply to Ary,
Steven Schveighoffer wrote:
On Tue, 19 May 2009 00:29:17 -0400, Ary Borenszweig
wrote:
Jesse Phillips escribió:
On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
"Chad J" wrote in message
news:gut1od$l5...@digitalmars.com...
Lionello Lunesu wrote:
"Chad J" w
Robert Fraser wrote:
Chad J wrote:
Nevermind properties. Any chance we can forbid the omittable
parentheses, at least in the lhs of an assignment expression?
In the more general case, any value type that gets modified but never
read or copied elsewhere is probably either dead code, a bug, or a
Jérôme M. Berger escribió:
Robert Fraser wrote:
Chad J wrote:
Nevermind properties. Any chance we can forbid the omittable
parentheses, at least in the lhs of an assignment expression?
In the more general case, any value type that gets modified but never
read or copied elsewhere is probably e
Ary Borenszweig wrote:
That's what I said it's a contract on the semantic of properties. :)
But now I'm curious: what kind of properties do you write?
A getter that does calculations and caches the results (rarely).
A proxied getter that does lazy loading from a database table (like
NHiberna
30 matches
Mail list logo