> On 06 Jun 2016, at 21:17, Eduardo Cavazos <wayo.cava...@gmail.com> wrote: > > On Mon, Jun 6, 2016 at 2:08 PM, yary <not....@gmail.com> wrote: > > For your particular case, would it be sufficient to set the values in > the constructor? > > with Point.new( :x(10) ) { .say } > # says "Point.new(x => 10, y => Any)" > > Normally, that would be a good way to construct the Points in my example. I'm > just using the approach in my note to demonstrate 'with'.
“with” is completely agnostic about what it is working on. It merely checks for definedness and sets the topicalizer if so. Please also note there is nothing special about the method .new per se: it’s just that there is some nice functionality built into the core if you don’t create your own method “new” in your class and you inherit from Any (which is the default). Your suggestion seems rather specialized for your situation. Liz