[nem-en] macros overload possible?

Kamil Skalski kamil.skalski at gmail.com
Sun Jun 17 19:00:59 CEST 2007


No, but you can create a macro 'a', which will takes any number of
parameters and then do the "dispatch"  by your own inside the macro.

macro a (params x : list[PExpr]) {
  match (x) {
    | [p] =>
    | [p1, p2] =>
  }

}

2007/6/17, Dmitry Ivankov <divanorama at gmail.com>:
> Is it possible to overload macros-functions by number of params?
>
> macro a()
> macro a(b)
> macro a(b,c)
>
> Or the only way is macro a(b=null, c=null)?
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>


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



More information about the devel-en mailing list