[nem-en] patch for matching compiler

Kamil Skalski kamil.skalski at gmail.com
Mon Oct 24 10:29:31 CEST 2005


05-10-24, Marcin Grzeskowiak <fnord at silesianet.pl> napisał(a):
> Two more things:
> 1) my patch should close bug 534

Correct

> 2) I am not sure if this is intentional or a bug but I had some problems
> with constructors in variants that contain constant options, e.g.:

Yes, this is a bug. If there is a field in variant, then empty variant
options should behave just like those with some elements (they are not
optimized to use a singelton through whole app execution)

>
> variant V
> {
>   A { v : V; }
>   B
>
>   public x : int;
>
>   public this ()
>   {
>     x = -1;
>   }
> }
>
> The constructor is called each time V.A () is instantiaded but only once
> for V.B ().
> In DecisionTreeBuilder.n I had this problem with Decision.Failure and
> I handled this by adding unused field to the option (but it took me
> some time to find out why my code isn't working).
>
> Marcin
>
> PS. sorry if my posts are outside the thread but currently I can't
> use any mail client to send them
>
>
> *************************************************
>     Śląski Pasaż Handlowy - wpadnij na zakupy
>             http://pasaz.silesianet.pl
> *************************************************
>
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


--
Kamil Skalski
http://nazgul.omega.pl


More information about the devel-en mailing list