[OT] Modules dropped out of C++17

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 9 23:14:54 PDT 2015


On Wednesday, 10 June 2015 at 05:31:18 UTC, Shachar Shemesh wrote:
> On 10/06/15 00:29, Walter Bright wrote:
>> First off, D does not allow "shadowing" local variable 
>> declarations.
>> Secondly, if you've got a lot of global variables, you've got 
>> a program
>> design problem anyway. And lastly, naming everything "diskIdx" 
>> is a
>> problem of your own creation.
> The first one is called so because it names the index of the 
> disk within a RAID stripe. It's probably an iterator.
>
> How would you call the second time I use such an iterator?
>
> You might argue that the function that extracts the disk index 
> should be named something more verbose (i.e. - 
> extractTheDiskIndex), but then you are just repeating Ola's 
> criticism[1] of D as if it is a desirable thing.
>
> People on this list hold a certain paradigm in their head when 
> they make design decisions. That's fine, except if you hold on 
> to this paradigm and assume anything that violates it is bad 
> code, you are going to end up with Go: a language only fit for 
> those problems that happen to fall within that paradigm.
>
> People have preconceptions on how code should look like. I 
> would humbly like to ask people to stop ->assuming<- that 
> anything that violates them is bad code.
>
> Shachar
>
> 1 - 
> http://forum.dlang.org/post/uvajlhfztejvwnubszpb@forum.dlang.org

I do think you think at it the wrong way. people are not telling 
you it is bad code. You are telling us it is bad code (because 
you mention having problem that people using other style do not 
have).


More information about the Digitalmars-d mailing list