[OT] Affect of typing styles on coding style (Was: Make dur a property?)

Jacob Carlborg doob at me.com
Thu Jan 24 00:47:32 PST 2013


On 2013-01-24 06:16, Nick Sabalausky wrote:

> Heh, actually, case in point, take a look at my normal work setup:
>
> http://66.228.38.161/download/img/jobs-would-have-hung-employees-for-doing-this.jpg
>
> (Yes, I need to get a wireless keyboard/trackball ;) )

That's not a good work setup, in any way. Close the laptop and get a 
real, external monitor, or two. I'm serious, you're going to break your 
neck, sooner or later.

>> Now, for @property setters, we might use them for other
>> operations too.
>>
>> @property int a() { return 10; }
>> @property void a(int v) { ... }
>>
>> a += 10;
>>
>> should be transformed into a(a() + 10); which is not currently
>> done.
>
> Geez, we still don't have that?

No we don't :( That's also one reason why a public fields cannot be 
changed to a property without breaking the API, see: 
http://forum.dlang.org/thread/ceukykobasewoexsrveb@forum.dlang.org?page=8#post-kdqs3u:2414i1:241:40digitalmars.com

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list