Le dimanche 04 mars 2012 à 19:22 +0100, bioinfornatics a écrit :
> Le dimanche 04 mars 2012 à 02:50 +0100, bioinfornatics a écrit :
> > dear,
> > I have a little code who is able to delegate to an array see below code:
> > https://gist.github.com/1969776
> >
> > It should realy great to have same
Le dimanche 04 mars 2012 à 02:50 +0100, bioinfornatics a écrit :
> dear,
> I have a little code who is able to delegate to an array see below code:
> https://gist.github.com/1969776
>
> It should realy great to have same into std.array and into std.range
> (for reach different range )
>
Need he
dear,
I have a little code who is able to delegate to an array see below code:
https://gist.github.com/1969776
It should realy great to have same into std.array and into std.range
(for reach different range )
Le samedi 03 mars 2012 à 19:18 +0100, Jacob Carlborg a écrit :
> On 2012-03-03 17:50, bioinfornatics wrote:
> > Le samedi 03 mars 2012 à 17:42 +0100, bioinfornatics a écrit :
> >> hi,
> >> In ruby we can delegate some method. by example:
> >> Ruby
> >> class MineArray
> >>include Forw
Le samedi 03 mars 2012 à 19:18 +0100, Jacob Carlborg a écrit :
> On 2012-03-03 17:50, bioinfornatics wrote:
> > Le samedi 03 mars 2012 à 17:42 +0100, bioinfornatics a écrit :
> >> hi,
> >> In ruby we can delegate some method. by example:
> >> Ruby
> >> class MineArray
> >>include Forw
Le samedi 03 mars 2012 à 19:45 +0100, Adam D. Ruppe a écrit :
> On Saturday, 3 March 2012 at 16:50:45 UTC, bioinfornatics wrote:
> > can w do same in D ?
>
> alias this does that, although it does for all unknown
> methods, not specific ones:
>
> struct A {
> int[] data;
> alias data this
On Saturday, 3 March 2012 at 16:50:45 UTC, bioinfornatics wrote:
can w do same in D ?
alias this does that, although it does for all unknown
methods, not specific ones:
struct A {
int[] data;
alias data this;
}
A a;
a[0] = 10; // this works like a.data[0] = 10;
alias this also lets y
Le samedi 03 mars 2012 à 19:18 +0100, Jacob Carlborg a écrit :
> On 2012-03-03 17:50, bioinfornatics wrote:
> > Le samedi 03 mars 2012 à 17:42 +0100, bioinfornatics a écrit :
> >> hi,
> >> In ruby we can delegate some method. by example:
> >> Ruby
> >> class MineArray
> >>include Forw
On 2012-03-03 17:50, bioinfornatics wrote:
Le samedi 03 mars 2012 à 17:42 +0100, bioinfornatics a écrit :
hi,
In ruby we can delegate some method. by example:
Ruby
class MineArray
include Forwardable
def_delegators: @array, :[], :[]=, :each_with_index, :length
def initialize(
Le samedi 03 mars 2012 à 17:42 +0100, bioinfornatics a écrit :
> hi,
> In ruby we can delegate some method. by example:
> Ruby
> class MineArray
> include Forwardable
> def_delegators: @array, :[], :[]=, :each_with_index, :length
>
> def initialize( array )
> @array = array
>
hi,
In ruby we can delegate some method. by example:
Ruby
class MineArray
include Forwardable
def_delegators: @array, :[], :[]=, :each_with_index, :length
def initialize( array )
@array = array
end
end
-
this code delegate opIndexAssign opIndex, length ... attrib
11 matches
Mail list logo