The Swift Programming Language

General Question: Is Swift a good programming language?

Elaboration: Would mobile programming in swift be easy/enjoyable as someone who's background is mainly C/C++/Python (with some Java and JavaShit derivatives)

I've been thinking about it more and more and the syntax doesn't look all that bad but I haven't actually dove into it with how busy my current workload is. Is it something that would be beneficial/fun to do?

The other part of the question is how well does it benchmark against other languages, in terms of the abstraction vs. performance tradeoff. Like how Python abstracts a lot of under-the-hood stuff in order to be written as a clean and easy-to-read language, whereas if you program in C and C++ sacrifice you readability for the ability to hyper-optimize your code and have it run extremely well.

Attached: Bones-GladWeFinallyHaveAnUnderstanding.png (1024x585, 52K)

Other urls found in this thread:

bugs.swift.org/si/jira.issueviews:issue-html/SR-124/SR-124.html
pymotw.com/2/socket/udp.html
developer.apple.com/videos/play/wwdc2018/715/
twitter.com/SFWRedditGifs

Also forgot to mention this but I remember trying to program with Android and it was absolutely abominal

well designed language in a shitty ecosystem.
Heck even the core library is bad because it has to please the obj-C faggots.

It could have been nice if it didn't have all this stupid Objective C baggage.

TO BE FAIR the iOS ecosystem is probably better than Android's software wise. Yea sure Android is kinda cool but the fact that they use bloated fucking java for everything ruins everything, whereas iOS had a sort of a limited design range (if you dont consider iPads and the X+ devices)

swift, why claiming cross-platform, only works properly in apple OSs, which is a huge minus since other languages (even java) can work in a huge range of environments.

It has Ubuntu ports for server-side backend purpose.

You need blind everything from even haskell,scheme or Ocaml had better support.

yea but im talking about strictly iOS programming

Also we see that when we generalize for any devices we generally experience poorer performance especially in Java's case

What sort of madman would want to use Swift for backend server code

Yes, Swift is good design.
But iOS is huge amount libraries over small set language.

Swift get decent performance but usually high performance need use UnSafePointer and special memory handler to avoid ARC.

Yes, it even has an unofficial windows port.

Yet I have never ever seen anything written by swift for those environment.

>yea but im talking about strictly iOS programming
Then use it. You only have two choices anyway. And Obj-C sucks.

still waiting for this
bugs.swift.org/si/jira.issueviews:issue-html/SR-124/SR-124.html

How to write equivalent of this udp echo server
in swift, everything I've tried doesn't work

forgot link
pymotw.com/2/socket/udp.html

Your best choice in the Apple ecosystem.
Completely pointless outside of it.

Yes. I have been using it at work for about a year for iOS/MacOS programming. It's much faster and comfier than objc. Be warned that the community is rust-tier, the tooling is shit, and that ABI stability isnt coming until April.

Apparently after Swift 5 is released they are going to be focused on better linux support and better support for avoiding ARC so that it can become a systems programming language, but I'm not holding my breath.

What Objective C baggage does it have? Do you mean cocoa? I thought they removed all the old stuff from the syntax and standard library a couple of years ago

Portable way is to bridge to the c code and just call the same functions with the same parameters.
If you're on macOS, you can just use NWListener from Network.framework, developer.apple.com/videos/play/wwdc2018/715/

>And Obj-C sucks
It really doesn't. If you don't code like a five-year-old, it's still faster than Swift, not to mention the compile times.

It's wholly dependent on the objective-c runtime

Except that it runs completely without it on linux.