ndslice: feature deprecation voting / discussion

Manu via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 2 20:01:11 PDT 2016


On 3 October 2016 at 01:00, Andrei Alexandrescu via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On 10/02/2016 10:02 AM, Ilya Yaroshenko wrote:
>>
>> Timothee Cour proposed to deprecate arguments without [ ... ] that
>> represent shape .
>>
>>   auto a0=iota(3*4).sliced(3,4); // proposal:deprecate
>>   auto a1=iota(3*4).sliced([3,4]);
>>   auto a2=iotaSlice(3,4); // proposal:deprecate
>>   auto a3=iotaSlice([3,4]);
>>   auto a6=slice!int(3,4);// proposal:deprecate
>>   auto a4=slice!int([3,4]);
>>
>>   ... the same for blocks, windows, ... etc.
>>
>> Mir Issue: https://github.com/libmir/mir/issues/337
>>
>> Current Yes: Timothee Cour, John Colvin
>> Current No : Ilya Yaroshenko, Relja Ljubobratovic
>>
>> If you want to see the code please use Phobos code (not Mir). Template
>> bloat was significantly reduced in
>> https://github.com/dlang/phobos/pull/4823.
>
>
> My general thinking here is that if we improve compiler technology to avoid
> template bloat, that would "lift all boats" i.e. make everybody's life
> better. So that would be preferable (to the extent possible) to requiring
> user-level idioms. -- Andrei

Ah, the 'sufficiently high-quality compiler' unicorn. It's been a
legend in C++ for at least 20 years that I've been looking... I have
developed and shipped something like 17 games in the meantime waiting
for compilers to not suck. In many cases they are better today, but in
many cases they still suck. It's a dangerous proposition to have
engineers expect the compiler works properly and discourage good
(practical) practise or understanding codegen because "the compiler
'should' do that for you" ;) ... They are a particular (dangerous)
kind of engineer that appears in the wild, and I often dismiss job
applicants on this basis.
My take on this comment, don't EVER say "the compiler 'should' do this
thing for you" until *all compilers* do.

Regarding the OP... I'm nervous about this change. Why do it? If it
doesn't inline for any reason, it's quite a blow on windows.


More information about the Digitalmars-d mailing list