Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
sitkack
on Sept 27, 2014
|
parent
|
context
|
favorite
| on:
John Carmack on Inlined Code
If you get tired of the switch statement, pattern matching is the functional dual of polymorphic dispatch.
eru
on Sept 29, 2014
[–]
Even though, pattern matching (and algebraic datatypes) would work just as well in an imperative language as in a function setting.
(Not sure, whether you'd need garbage collection to make pattern matching really useful, though.
sitkack
on Sept 29, 2014
|
parent
[–]
Pattern matching is welcomed everywhere, it saves conditionals and keeps the code clean.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: