Arbitrary abbreviations in phobos considered ridiculous

deadalnix deadalnix at gmail.com
Tue Mar 6 13:30:04 PST 2012


Le 06/03/2012 21:00, Timon Gehr a écrit :
> On 03/06/2012 07:13 PM, Alex Rønne Petersen wrote:
>> (Also, seriously, I think you're over-dramatizing the Java variable
>> naming thing; I rarely see names that are as bad as you claim...)
>>
>
> It is not only about single names, but also about how many times you
> have to spell them out in short intervals.
>
> try{
> SqlConstraintViolatedExceptionFactoryWrapper
> sqlConstraintViolatedExceptionFactoryWrapper = new
> SqlConstraintViolatedExceptionFactoryWrapper(new
> SqlConstraintViolatedExceptionFactory(...));
> SqlConstraintViolatedException sqlConstraintViolatedException =
> sqlConstraintViolatedExceptionFactory.createSqlConstraintViolatedException(...);
>
> throw sqlConstraintViolatedException;
> }catch(SqlConstraintViolatedExceptionFactoryWrapperException e){
> // ...
> }catch(SqlConstraintViolatedExceptionFactoryException e){
> // ...
> }
>
> Deliberately over-dramatized.

As I said, names comes in a context. Overly long names tell about the 
fact that the name isn't at the right place and things should be 
refactored, to provide a nice place to that named stuff.

auto helps too.


More information about the Digitalmars-d mailing list