Luke Palmer wrote:

Joked?  Every other language that has pattern matching signatures that
I know of (that is, ML family and Prolog) uses _.  Why should we break
that?  IMO, it's immediately obvious what it means.

Something tells me that in signature unification, "undef" means "this
has to be undef", much like "1" means "this has to be 1".

In Perl6 we currently have at least tw oways to say "don't care": In a regex, we say /./ to match anything; in a type signature, we use "Any" to mean that we don't care what the type is. I don't think we need another way to say "don't care". In fact, we could unify things:

  rules: /<Any>/ matches anything (/./ is shorthand synonym)
  binding: ($a, Any, $b) := (1,2,3);

I'll admit that "Any" doesn't immediately shout "skip", but it would really be the fact that there's no variable associated with it that means "skip", If we'd wanted to skip an integer, we could say:

  ($a, Int, $b) := (1,2,3);

Why would Perl need to add "_" as a synonym for "Any"? It's only a couple of characters shorter! The argument for /./ being a synonym in rexen is easier to make: it's common, it's legacy, and it's 4 chars shorter.

Reply via email to