http://wiki.dlang.org/DIP25

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 5 22:48:11 PST 2015


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.


More information about the Digitalmars-d mailing list