C++0x Concepts - Dead?
BLS
windevguy at hotmail.de
Thu Jul 16 17:32:03 PDT 2009
bearophile wrote:
> BLS:
>>>> bearophile brings in several times Scala/OCAML like pattern matching.
>>>> Why not using that for constraints ?
>>> I have no idea how that works, though Bartosz has been looking into it.
>> O well, I am pretty sure that bearophile is willing to give you any
>> information you need :)
>
> Pattern matching is handy and it can be powerful, for example I've seen OCaML code that uses it to implement a AVL search tree in about 15 lines of code. But probably it also adds lot of complexity to a language like D, so there are more important things to add to D2 now (like good concurrency).
>
> Bye,
> bearophile
I see your point... you are doing bio informatics..so speed matters..
for me the things are a bit different...
But I guess that you'll agree with me that Scala pattern matching has a
reasonable syntax. (Not necessarily talking about "How difficult is it
from a compiler author's view)
object MatchTest2 extends Application {
def matchTest(x: Any): Any = x match {
case 1 => "one"
case "two" => 2
case y: Int => "scala.Int"
}
println(matchTest("two"))
}
More information about the Digitalmars-d-announce
mailing list