> On 15 Oct 2015, at 12:57, Mark Overmeer <m...@overmeer.net> wrote:
> 
> * Elizabeth Mattijsen (l...@dijkmat.nl) [151015 10:43]:
>> FWIW, I’m with FROGGS on this.
>>  use variables :D;
> 
> In the first response to this message, Moritz spoke about
>     use invocant :D;
> and use parameters :D;
> 
> Three different things?

There are actually 4 different default setters:

use variables :D;    # works, e.g. ‘my Int $a = 42’
use attributes :D;   # works, e.g. ‘has Int $.a = 42’
use invocant :D;     # parses, does not work yet, e.g. method a(Int:) {} # 
Int:D:
use parameters :D;   # parses, does not work yet, e.g. sub a(Int $a) {}  # Int:D


>> at the top of the scope of your code, and then you’re set.  I admit
>> it feels a *little* like the “use strict” boilerplate of Perl 5.
> 
> It is.
> 
>> On the other hand, I think by just specifying a type *without* smiley,
>> is already so much better than the situation in Perl 5 that the lacking
>> strictness of :D will not be needed much to catch programming / garbage
>> in type of errors anyway.
> 
> Much better, of course.  Programming languages are used by people
> of different taste.  Some may find "much better" enough, other people
> want more.

And sometimes less is more  :-)



Liz

Reply via email to