http://wiki.dlang.org/DIP25

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 6 05:50:24 PST 2015


On 1/6/15 1:48 AM, Walter Bright wrote:
> On 1/5/2015 2:04 PM, Steven Schveighoffer wrote:
>> To give you an example of why that sucks, imagine that your accessor for
>> member_x is nothrow, but your setter is not. This means you either
>> "make an
>> exception", or you just split up obvious file-mates into separate
>> corners.
>> Source control gets confused if one of those attributes changes.
>> Nobody is happy.
>>
>> Grouping by attributes is probably one of the worst ways to have
>> readable/maintainable code.
>>
>> One of the most important reasons why unittests are so successful is
>> that you
>> can just plop the code that tests a function right next to it. So easy
>> to find
>> the code, so easy to maintain when you change the target of the test.
>> Making
>> some way to bundle attributes, or be able to negate currently one-way
>> attributes
>> would go a long way IMO.
>
>
> I know and agree. I was just responding to the 'impossible'
> characterization.

OK, Mr. Literal :) Sorry, I should have said "impossible without totally 
screwing up the code"

-Steve


More information about the Digitalmars-d mailing list