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

You seem to be confusing Java-like interfaces and design patterns with types. That's not representative of what great type systems can do for you.


I'm confusing types and 'Java-like interfaces and design patterns' to the same degree that you're confusing swift's type system with 'what great type systems can do for you.'

The type system of swift is much closer to java than to that of haskell. (Or whatever language you think has a 'great' type system)

For example in F# if you just use one method the type system will infer that you need an object that has that method. (especially if that method is an operator)

eg. let add a b = a + b will work on any pair of objects that have the + operator defined. That is a good and useful type system, what swift has just makes you type more for little benefit.

eg. making types is easy, reflecting methods is hard. (it should be noted that swift effectively doesn't support reflection)


You mistake me: I wasn't talking about Swift, a language I'm barely familiar with. I was puzzled by your more general assertion about "the kind of apps where a great type system would really shine". So far you haven't explained what you meant by this; you seemed to be complaining about enterprise software, but a lot of enterprise software isn't built with programming languages featuring great or even particularly modern type systems.

I'm not sure what reflection has to do with this. I'm sure you're aware there are "great type systems" which do not use reflection.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: