Hacker News new | ask | show | jobs
by chadzawistowski 3853 days ago
Pattern matching and structural types!

In terms of modernity, I think Swift is between C# and F#. However, Swift is far more mainstream than F#.

3 comments

These are the 2 features I can't wait for in C# 7. Pattern matching and structural typing along with discriminated unions are pretty awesome. Like, I want the current C# type system, but with those things with it to forget about a bunch of boilerplate and odd problems that can pop up otherwise.
I can't find the tweet, but someone said something like "what do I think of swift? Seeing all of iOS using a language which has features normally reserved for functional languages is wonderful."
neither are of great benefit imo. they certainly don't allow me to do anything new... just enable me to do things with less work.

this is not a bad thing, and certainly is a good thing, but on its own its a tiny benefit compared to writing code that works on all platforms, and which compiles to very efficient use of instructions (i have ample experience removing swift and obj-c code as an optimisation strategy sadly).