[nem-pl] Re: [svn] nemerle/trunk/lib/internal-numbered.n

Lukasz Kaiser kaiser at tenet.pl
Thu Jun 3 12:16:41 CEST 2004


Hej.

> hmm...
> 
> postscan
> macro MakeEquals (t : TypeBuilder) {
>   def flds = t.GetFields (NemerleAttributes.Public %|
>                                           NemerleAttributes.NonPublic %|          
>                                           NemerleAttributes.Instance);
>   def body = 
>   List.FoldLeft (flds, <[ true ]>, fun (x : IField, acc) { 
>       def nm = UsesiteSymbol (x.Name);
>       <[ $acc && $(nm : name).Equals (parm.$(nm : name)) ]>
>   };
>   t.Define (<[ decl:
>       public Equals (parm : $(t.FullName () : dyn)) { $body }
> }
> 
> Jak przetestuj??, co commitn?? :D

Hmm, a mogloby od razu dodwac GetHashCode ? Czy w ogole przeciazanie
GetHashCode ma sens, a jesli tak to jak go dobrze przeciazyc dla
krotek, czy XOR jest ok czy zupelnie bez sensu ?

- lk





More information about the devel-pl mailing list