Why is `scope` planned for deprecation?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 18 15:41:26 PST 2014


On 11/18/2014 2:35 PM, H. S. Teoh via Digitalmars-d wrote:
> On Tue, Nov 18, 2014 at 02:14:20PM -0800, Walter Bright via Digitalmars-d wrote:
>> On 11/18/2014 1:12 PM, H. S. Teoh via Digitalmars-d wrote:
>> No, I proposed a new syntax that would have different behavior:
>>
>>    void foo(char a[..])
>
> Ah, I see. How would that be different from just declaring an array
> struct and using it pervasively?

   foo("string");

won't work using a struct parameter.


> Existing C code would not benefit from
> such an addition without a lot of effort put into refactoring.

Except that the syntax is not viral and can be done as convenient. And, as 
mentioned in the article, people do make the effort to do other, much more 
complicated, schemes.



More information about the Digitalmars-d mailing list