Do we need a time-out in D evolution?

Bill Baxter dnewsgroup at billbaxter.com
Sun Jun 10 12:02:53 PDT 2007


Walter Bright wrote:
> Deewiant wrote:
>> Walter Bright wrote:
>>> const by default is too big a change, and I'm reluctant to do something
>>> so far out of the mainstream of these types of languages.
>>
>> Perl 6 has const by default for subroutine parameters. Okay, so it's 
>> not "this
>> type of language", but it's worth mentioning as it's still _Perl_, a 
>> language
>> steadily a couple or more places above D in the TIOBE index.
> 
> By "these types of languages", I mean C-style compiled languages. There 
> are many functional languages where const is the default.

Hey, Perl is a "curly brace" language too!  ;-)

Here's the lo-down on Perl 6:
http://www.perl.com/pub/a/2003/07/29/exegesis6.html

They're using the syntax
sub Foo(Num x) { ... }  # x is const ref
sub Foo(Num x is rw) { ... }  # x is 'read-write' ref
sub Foo(Num x is copy) { ... } # x is pass by value

--bb



More information about the Digitalmars-d mailing list