new, pattern matching, scoping

Robert Fraser fraserofthenight at gmail.com
Tue Mar 4 14:20:16 PST 2008


Interesting articles! First one was too long ;-P, but here are my 
thoughts on the others:

bearophile wrote:
> Pattern matching, like in Mathematica (very refined), OCaml (faster), Haskell (simple), or OMeta (powerful) is probably useful inside D too, this is a page from Haskell docs:
> http://www.haskell.org/tutorial/patterns.html

Well, I agree pattern matching is a useful construct. We already have 
some sort of "pattern matching" with template specialization. How 
exactly do you think this could be worked into D, however, since we 
don't have first-class tuples or dynamic typing?

> With the closures of D 2.x, D may need to improve its scoping rules to something more clean:
> http://tratt.net/laurie/tech_articles/articles/designing_sane_scoping_rules

D doesn't have implicit variable declaration, so this isn't as much of 
an issue. IMO, marking every other variable I reference (i.e. member 
variables in classes enclosing methods, etc.), would just be too much work.



More information about the Digitalmars-d mailing list