Discussion:
macros overload possible?
Dmitry Ivankov
2007-06-17 15:00:02 UTC
Permalink
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)?
Kamil Skalski
2007-06-17 17:00:59 UTC
Permalink
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] =>
}

}
Post by Dmitry Ivankov
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
Loading...