Thats an interesting idea, although I lean towards thinking that an explicit Void is on the side of "good verbosity". Plus I think it would make parsing harder and impact IDE tooling.
go4Sat 5 Jun 2010
thanks! type inference also make parsing harder
another advice:
if return This,auto generation return this,because it's only allow to return this.
why shortcut a,b,c=>it.add(a).add(b).add(c) only for it-block.I want to use it like this list,1,2,4=>list.add(1).add(3).add(4)
brianSat 5 Jun 2010
f return This,auto generation return this,because it's only allow to return this.
It doesn't necessarily return this, it just returns something typed as this. I think this is a case where explicit and more verbose is probably a bit better then creating special rules
why shortcut a,b,c=>it.add(a).add(b).add(c) only for it-block.I want to use it like this list,1,2,4=>list.add(1).add(3).add(4)
The idea is that those adds should be wrapped in curly braces. For example this works just fine:
fansh> list := [,]
[,]
fansh> list { 1, 2, 3 }
[1, 2, 3]
fansh>
go4Sat 5 Jun 2010
Sorry,I falsely assumed that , is only shortcut for add().it's difficult to understand
rfeldmanMon 7 Jun 2010
I always wondered if maybe "Same" (or something else) would have been a better name than "This", which is so similar to "this" - a programming construct we intuitively associate with the current instance rather than the current class.
go4 Sun 23 May 2010
There is too many "Void", omit it if no returned;
brian Sun 23 May 2010
Thats an interesting idea, although I lean towards thinking that an explicit Void is on the side of "good verbosity". Plus I think it would make parsing harder and impact IDE tooling.
go4 Sat 5 Jun 2010
thanks! type inference also make parsing harder
another advice:
This
,auto generationreturn this
,because it's only allow to return this.a,b,c=>it.add(a).add(b).add(c)
only for it-block.I want to use it like thislist,1,2,4=>list.add(1).add(3).add(4)
brian Sat 5 Jun 2010
It doesn't necessarily return this, it just returns something typed as this. I think this is a case where explicit and more verbose is probably a bit better then creating special rules
The idea is that those adds should be wrapped in curly braces. For example this works just fine:
go4 Sat 5 Jun 2010
Sorry,I falsely assumed that
,
is only shortcut foradd()
.it's difficult to understandrfeldman Mon 7 Jun 2010
I always wondered if maybe "Same" (or something else) would have been a better name than "This", which is so similar to "this" - a programming construct we intuitively associate with the current instance rather than the current class.