Discussion:
List of languages with pattern matching parameters
(too old to reply)
elb
2014-04-12 17:15:22 UTC
Permalink
Hi,

I woule be interested by discovering as many languages as possible having this
well known feature: handling some conditional structures as pattern matching in
the parameters (rather than if/case statements at the beginning of the function
itself).

I am aware that pattern matching is not the exact thing as union in Prolog, but
please, don't focus too much on this point. I am rather interested by
discovering more languages or families of languages.

As far as I know, Prolog seems to be one of the first language with this idea.
Were there some older languages?

It looks like following languages also use it: erlang, haskell, and maybe scala.

Do you see other languages following the same idea?

Regards,

fu2 comp.lang.functional
--
elb.
Mark Carroll
2014-04-12 17:33:26 UTC
Permalink
Post by elb
I am aware that pattern matching is not the exact thing as union in Prolog, but
please, don't focus too much on this point. I am rather interested by
discovering more languages or families of languages.
As far as I know, Prolog seems to be one of the first language with this idea.
Were there some older languages?
Edinburgh ML is pretty old, I think, though maybe not that old. I think
a few languages in the 1970s, at least in academia, incorporated some
kind of pattern matching.

-- Mark
M. Strobel
2014-04-12 20:35:09 UTC
Permalink
Post by elb
Hi,
I woule be interested by discovering as many languages as possible having this
well known feature: handling some conditional structures as pattern matching in
the parameters (rather than if/case statements at the beginning of the function
itself).
I am aware that pattern matching is not the exact thing as union in Prolog, but
please, don't focus too much on this point. I am rather interested by
discovering more languages or families of languages.
As far as I know, Prolog seems to be one of the first language with this idea.
Were there some older languages?
It looks like following languages also use it: erlang, haskell, and maybe scala.
Do you see other languages following the same idea?
ML and OCaml do, a lot. I thought they "invented" it...

/Str.

Loading...