Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know it's a really trivial matter, but I actually got to use the tuple swap thing the other day and it felt so good.

  (ItemA, ItemB) = (ItemB, ItemA)
~50% of our methods don't even have block bodies anymore... Switch expressions are our bread & butter now. Once you learn how to combine expressions + switch + LINQ, you have the triforce of poor-man's functional programming inside the perfect imperative realm by which to protect it.


Do you have any other code examples or resources that speak more to this?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: