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

What specifically gives you that impression? I'm only asking because I find that Swift is more conceptually coherent than most other languages I have worked with.

The impression I get of Swift is that it takes a bit more effort to get over the learning curve since it introduces some novel concepts (null handling, affine types, the protocol system) but mostly it makes a lot of sense and becomes very nice to work with after getting over the hump.

C# seems easy to pick up by comparison because it's basically like a Java dialect and you just need to map the keywords etc.



> What specifically gives you that impression?

https://news.ycombinator.com/item?id=23520626

> since it introduces some novel concepts

They are not terribly novel


I mean novel relative to Java/C#.

Of the features you mentioned:

- guard is consistent with the priority Swift puts on explicit null handling. An optional is never transformed implicitly into a value. I actually think this is a very good thing and makes Swift easy to reason about in practice, even if it occasionally adds a bit of boilerplate.

- variadic generics are a hole in the language, I agree with you completely there.

- as far as the `some` keyword, existential types are also a concept in Rust and for good reason. With a powerful type system like these languages have, it's a distinction which has to be made in some cases. How would a better type system solve this problem?

- How would the compiler replace `callAsFunction`? Also the inclusion of callable types is consistent with the design philosophy of Swift to allow the user to express interfaces in which ever way he sees fit.

Honestly your criticisms read like you're trying to find fault with the language without making the minimum effort to understand why these features might have been designed the way they are.




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

Search: