Live data from Hacker News

Swift 6.3

swift.org

161–170 of 239 posts

Re: Swift 6.3

#161

Whats the stdlib situation for swift in comparison to newish languages like go or rust. I know its not batteries included lke python - and doesnt have a massive dev ecosystem of helper libs seeming to be mostly tied to macOS/iOS operating system API/ABI.

There are still challenges with basics like compression, which tends to involve trawling Github for the least dubious toy project. Even Apple's Compression framework is missing important algorithms like ZSTD. Another problem is the Apache Software Foundation don't seem to have any Swift maintainers, which means there really aren't any good pure Swift libraries for Arrow or Parquet. There are some really good open-sou…

> There are still challenges with basics like compression

FWIW, there is an active discussion on this very topic: https://forums.swift.org/t/proposal-compression-library/8541...

Re: Swift 6.3

#162
post #11

Whats the stdlib situation for swift in comparison to newish languages like go or rust. I know its not batteries included lke python - and doesnt have a massive dev ecosystem of helper libs seeming to be mostly tied to macOS/iOS operating system API/ABI.

A good source of available packages is the Swift Package Index. You can search here packages compatible with Linux[0]. [0] https://swiftpackageindex.com/search?query=platform%3Alinux

And also Android[1]!

[1] https://swiftpackageindex.com/search?query=platform%3Aandroi...

Re: Swift 6.3

#163

I spent last week (with Opus, of course) porting the xv6-riscv teaching operating system to a bunch of different languages. Zig, Nim, LISP, and Swift. The improvements in embedded Swift have definitely made it one of the most enjoyable/productive languages to work on the OS. I feel like I can build useful abstractions that wrap raw memory access and make the userland code feel very neat. On the other hand, the compil…

It's been a long time since I came across Nim. I thought it was really interesting about 12 years ago. What made you land on Nim instead of any of the more obvious alternatives?

Re: Swift 6.3

#164
post #147

Earlier quoted context omitted.

I'm sorry, that's absolutely bullshit. In fact, I wish we had left everyone who complained behind—the python community would have been happier and healthier for it. Absolute crybabies who wanted to be catered to without caring for how intractable the problems with python2 were—e.g. dealing with unicode was a royal pain in the ass, and the bytes/string divide completely fixed it. IMO, it was the best-executed breaking…

Being to aggressive in breaking stuff gets you a shitshow like Node.js or Ruby. Long-term source code compatibility is a very useful feature for open source and a sign of a mature eco system. Feel free to add stuff, but once it's part of a stable release it has to be maintained long after a "better" way to do it comes along.

nodejs itself doesn't have very many breakages; i have plenty of code that is unchanged from 0.12 to 24. npm is a whole other kettle of fish but I don't think you can blame the core project for the sins of everyone that publishes to the package manager. Python2 -> Python3 on the other hand had a lot of breakage in "standard" code.

Re: Swift 6.3

#165
did they ever add #define? bridging constants from the build system to swift with static NSString * const kConstValue = @XSTR(CONST_VALUE); is soooo annoying.

Re: Swift 6.3

#166
post #163

I spent last week (with Opus, of course) porting the xv6-riscv teaching operating system to a bunch of different languages. Zig, Nim, LISP, and Swift. The improvements in embedded Swift have definitely made it one of the most enjoyable/productive languages to work on the OS. I feel like I can build useful abstractions that wrap raw memory access and make the userland code feel very neat. On the other hand, the compil…

It's been a long time since I came across Nim. I thought it was really interesting about 12 years ago. What made you land on Nim instead of any of the more obvious alternatives?

I was looking for something that allows easy access to direct memory, with a syntax thats a little easier to explain than C. Frankly, zig was not actually a real viable option based on that syntax requirement but I still wanted to explore it.

Nim really is clean and simple.

Re: Swift 6.3

#167

Whats the stdlib situation for swift in comparison to newish languages like go or rust. I know its not batteries included lke python - and doesnt have a massive dev ecosystem of helper libs seeming to be mostly tied to macOS/iOS operating system API/ABI.

As of very recently, the entire stdlib (i.e. "Foundation") is open source and available on all platforms Swift targets. For a while, the Linux builds had a much smaller/limited version of Foundation, but it's fully supported now.

Re: Swift 6.3

#168

No mention of compilation speed improvements? Very unfortunate. Compilation times slower than rust really hampers the devx of this otherwise decent language.

I tried Swift a few months ago in a project that made use of a bunch of bigger dependencies and I was instantly shocked by the compilation times. It's quite unimaginable to me using Swift for everyday work because of that. Especially when coming from the fast compile times of Go. But it's really unfortunate because I really enjoyed writing Swift because it feels like a very well made language. But iterating on some code and trying to get quick feedback is pure pain.

Re: Swift 6.3

#169

How is the toolchain? Does Swift Lint and Swift Format support the newest version. Honestly, the modern program language should have the built-in formatter and recommend lint rules. It is not just shipping a program language, it is a while ecosystem.

Both are apart of the toolchain now, no external dependencies required: `swift format` and `swift format lint` to access them

Re: Swift 6.3

#170

Swift truly is one of the languages of all time. I started a mobile app with the UI built in Swift and the core in Rust. The amount of implicit and hidden behaviour, magical fields being generated on objects because of certain annotations, the massive amount of @decorators...it's too much. I'm going to have an LLM generate the SwiftUI and touch as little of it as possible. It's also strange because before I learned S…

What are you using for rust-swift interop?

uniffi
Post reply on HN