Hacker News new | ask | show | jobs
by wool_gather 2784 days ago
> It has been my impression that [...] Swift attempts to be more user friendly or appeal more to the average programmer

I would dispute this somewhat. I really think Swift was conceived to be a better C++. The stated "world domination" goal has always included systems programming. (I don't find it realistic personally that a single language can reasonably span from writing an OS to utility scripting, but that's been the pitch.) I would guess that, privately at least, Swift sees Rust as a competitor.

That said, the Swift core team does take learnability and what they call "progressive disclosure" seriously. They've emphasized that this particular feature should be something that most Swift users won't need to know or think about. They definitely do spend time and effort on people who are new to the language.

The other thing that may contribute to the impression that Swift is "less advanced" is simply its userbase. Its life started in GUI application development for Apple platforms and that's also key to its success -- iOS is hot right now. That's the majority of its deployment, and I think it will remain so for quite a while.

We iOS devs may be average or not, but most of the code we write is not high-performance mission-critical algorithm-laden wizardry, just grabbing some JSON off a REST endpoint and animating the information into a table view. ;)

1 comments

Well, this is Apple's official point of view on Swift's purpose.

> Swift is a successor to both the C and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics, giving Cocoa and Cocoa Touch developers the performance and power they demand.

Taken from https://developer.apple.com/swift/

> Swift is intended as a replacement for C-based languages (C, C++, and Objective-C).

Taken from https://swift.org/about/

Yes, good point, thanks. But this is not quite what I was intending to say. The character of Swift is not very C- or ObjC-like. C's philosophy is largely (to borrow from Python) "we are all consenting adults here": raw flexibility is the name of the game. ObjC's class system is famously late-binding and runtime-malleable, and it carries all the flexibility of C. These are things that Swift eschews.