[Issue 6176] [tdpl] Cannot use string variables in case expressions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 15 09:54:58 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=6176


Alex Rønne Petersen <xtzgzorex at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xtzgzorex at gmail.com


--- Comment #11 from Alex Rønne Petersen <xtzgzorex at gmail.com> 2012-01-15 09:54:54 PST ---
I'm just going to interject here.

I don't understand why anyone sees the need to limit the switch construct in
any way. Why force it to use compile-time values? Why force it to support
primitives only?

A full-blown, generalized switch would greatly improve D's expressiveness, and
would cater to functional programmers. Functional languages have shown that
pattern matching (which is essentially just a generalized switch, or -- as I
like to call it -- switch done *right*) is extremely useful to write short and
concise code, especially the ML family of languages (SML, OCaml, F#, etc).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list