Algebraic data types: Difference between revisions

Content added Content deleted
(Corrected C++ language tags)
(Merge omitted languages at bottom and add Processing)
Line 1: Line 1:
{{task|Data Structures}}{{omit from|BBC BASIC}}
{{task|Data Structures}}


Some languages offer direct support for [[wp:Algebraic_data_type|algebraic data types]] and pattern matching on them. While this of course can always be simulated with manual tagging and conditionals, it allows for terse code which is easy to read, and can represent the algorithm directly.
Some languages offer direct support for [[wp:Algebraic_data_type|algebraic data types]] and pattern matching on them. While this of course can always be simulated with manual tagging and conditionals, it allows for terse code which is easy to read, and can represent the algorithm directly.
Line 2,067: Line 2,067:


{{omit from|Ada}}
{{omit from|Ada}}
{{Omit from|C}}
{{omit from|BBC BASIC}}
{{Omit from|Java}}
{{omit from|C}}
{{Omit from|Pascal}}
{{omit from|Java}}
{{Omit from|Python}}
{{omit from|Pascal}}
{{omit from|Processing}}
{{omit from|Python}}
{{omit from|TI-83 BASIC}}
{{omit from|TI-83 BASIC}}
{{omit from|TI-89 BASIC}}
{{omit from|TI-89 BASIC}}