Talk:Algebraic data types: Difference between revisions

From Rosetta Code
Content added Content deleted
(Move page?)
 
(no, it's a fine page)
Line 1: Line 1:
I like the task, but I don't think it's a good application of the general case of pattern matching. [[Pattern Matching]] should probably be geared towards globs and regular expressions, while this page should get moved to something like [[Red-Black Tree]]. Thoughts? --[[User:Short Circuit|Short Circuit]] 22:19, 6 November 2007 (MST)
I like the task, but I don't think it's a good application of the general case of pattern matching. [[Pattern Matching]] should probably be geared towards globs and regular expressions, while this page should get moved to something like [[Red-Black Tree]]. Thoughts? --[[User:Short Circuit|Short Circuit]] 22:19, 6 November 2007 (MST)
:Actually, I think this is an ideal example of a key functional programming loanguage capability. Most functional programming pattern matching examples use very trivial patterns which could just as easily be implemented with an imperative switch statement. This example shows how pattern matching can simplify rather complex decision making. Regex stuff is rather primitive by comparison. There are only a handful of programming languages that are powerful enough to implement this example, so I don't expect this page to grow very large. --[[User:IanOsgood|IanOsgood]] 08:01, 7 November 2007 (MST)

Revision as of 15:01, 7 November 2007

I like the task, but I don't think it's a good application of the general case of pattern matching. Pattern Matching should probably be geared towards globs and regular expressions, while this page should get moved to something like Red-Black Tree. Thoughts? --Short Circuit 22:19, 6 November 2007 (MST)

Actually, I think this is an ideal example of a key functional programming loanguage capability. Most functional programming pattern matching examples use very trivial patterns which could just as easily be implemented with an imperative switch statement. This example shows how pattern matching can simplify rather complex decision making. Regex stuff is rather primitive by comparison. There are only a handful of programming languages that are powerful enough to implement this example, so I don't expect this page to grow very large. --IanOsgood 08:01, 7 November 2007 (MST)