
Swift 5.2 - andrewbarba
https://swift.org/blog/swift-5-2-released/
======
ashton314
Looks like a solid update on first glance. I nearly tore my hair out last
month building a SwiftUI app. The error messages were _terrible_ —I had never
seen such poor error messages. I'm so glad they're addressing that.

~~~
SkyPuncher
Swift is one of my favorite languages. Until I hit a fucking error. Then I
just want to be done with it.

~~~
hombre_fatal
The errors are so bad that it trains me to never write more than a few lines
at a time without compiling/running it.

The runtime errors can be comically bad, bucking you into a screen of assembly
for the simplest of mistakes.

~~~
saagarjha
Perhaps you have debug symbols disabled?

------
xscott
Has anyone had good luck getting Swift running on Linux? Many versions ago, I
had it working under Ubuntu, and it seemed really nice. I particularly liked
having a REPL for this style of language.

However since then, I've had very limited success under Ubuntu, CentOS, and
Arch. Different failures on each. Every few releases or so I give it a go, but
something always fails and I go back to working on some other pet project.

~~~
saagarjha
Are the prebuilt toolchains
([https://swift.org/download/](https://swift.org/download/)) giving you
trouble?

~~~
xscott
I'm currently using Arch, so I don't think the prebuilt Ubuntu ones are going
to work.

~~~
resist_futility
Maybe just use the Docker builds?

~~~
xscott
I know I'm out of fashion :-), but I don't really use containers for anything.
I think Swift looks really nice, but when I check out other languages (such as
Go, Rust, or any of the gazillion others), I don't have to jump through any
hoops other than using the system package manager or something like
"./configure; make install". I wish Swift was in this camp.

~~~
pcr910303
> I don't have to jump through any hoops other than using the system package
> manager

Wouldn't that be something the package manager should include?

If you're using Arch, I'm pretty sure AUR have you covered... [0]

[0]
[https://aur.archlinux.org/packages/swift/](https://aur.archlinux.org/packages/swift/)

~~~
xscott
The last time I tried, it didn't go well. When the AUR package for swift or
swift-bin goes to 5.2, I'll probably try again.

> If you're using Arch, I'm pretty sure AUR have you covered...

Have you gotten it working with Arch?

There are user comments on the page you linked indicating other people have
had problems too.

------
rnantes
A great update to a safe and ergonomic language. The best is still yet to come
with Swift on Windows and Android, SPM Resources, and of course Async/Await.

~~~
hiitechk
Is Swift on Windows on the roadmap?

~~~
jurip
Ted Kremenek listed in his "On the road to Swift 6" post on the forums "Expand
the number of platforms where Swift is available and supported" as the first
item. ([https://forums.swift.org/t/on-the-road-to-
swift-6/32862](https://forums.swift.org/t/on-the-road-to-swift-6/32862))

Saleem Abdulrasool, who has been working on Swift on Windows, was also
recently added to the core team.

So I don't know if it's actually on the roadmap, if one exists, but official
support doesn't seem impossible.

~~~
jurip
Not impossible indeed. Swift 5.3 will officially support Windows:
[https://swift.org/blog/5-3-release-
process/](https://swift.org/blog/5-3-release-process/)

------
hashbig
All I want is official Swift support for an http server, and a web frontend
framework using SwiftUI.

~~~
the_gipsy
AFAIK SwiftUI is derived from or inspired by The Elm Architecture.

In any case for me, Elm has been extremely enjoyable, as a web frontend
framework and language combo.

~~~
hashbig
I am a huge Elm fan, and I have used it in many contexts. It is fair to say
that in the last 10 years React has most influenced the way we write our UI
and Elm has most influenced the way we manage our state on the frontend.

------
pjmlp
So _import Glibc_ is still a thing?

~~~
hiq
Can you expand on this?

~~~
pjmlp
Swift still doesn't have a mature standard library implementation that works
across all platforms.

So you have to do OS specific imports directly, for basic stuff like calling a
random number generator or handling IO.

It is even done so on the introduction pages, [https://swift.org/getting-
started/](https://swift.org/getting-started/)

Foundation outside Apple platforms is pretty much WIP.

~~~
zerr
Interesting, although, at least they have a cross-platform random now
(Int.random, Float.random, ...).

------
abjecton
I see some huge changes there, including the error messages!

------
elpakal
looking forward to the improved build times!

