Live data from Hacker News

Swift 6.3

swift.org

61–70 of 239 posts

Re: Swift 6.3

#61
post #12
post #6

> Swift is designed to be the language you reach for at every layer of the software stack. It's a nice lang for sure, but this will never be true with the way things are. Such wasted opportunity by Apple.

How so? I can indeed target every layer of the software stack using Swift, today . E.g. ClearSurgery[0] is written fully in Swift, including the real-time components running on the Linux boxes. [0] https://clearsurgery.vision

That it's designed for a thing and becoming the go-to choice for that thing can be far apart indeed.

Re: Swift 6.3

#62
post #12

Earlier quoted context omitted.

How so? I can indeed target every layer of the software stack using Swift, today . E.g. ClearSurgery[0] is written fully in Swift, including the real-time components running on the Linux boxes. [0] https://clearsurgery.vision

It just works. One language. Many platforms. Incredible performance. With a simple tooling. No ugly script. Everything is naturally integrated.

Isn’t that Go?

Re: Swift 6.3

#63

> Swift 6.3 introduces the @c attribute, which lets you expose Swift functions and enums to C code in your project. Annotating a function or enum with @c prompts Swift to include a corresponding declaration in the generated C header that you can include in your C/C++ files Why did this take so long to be added? Such strange priorities. Adding an entire C++ compiler for C++ interoperability before adding... C exports.…

it's been there for a while as an experimental feature. I used it in a project

Re: Swift 6.3

#64
post #34

Earlier quoted context omitted.

I don't know why anyone would want to use Apple tools if they are not developing for Apple platforms. Apple barely maintains compatibility for their own platforms, using Swift on a non-Apple platform is setting yourself up for doubule pain.

That was true for Swift 2, maybe a little for Swift 3, but it has not been true since a long time now…

In a way it still is true. Swift works on Windows and Linux until it doesn't. It's taken until a couple years ago for other build systems to get swift support (which I suppose is the fault of said build system, but Swift taking so long to be cross-platform contributed to that), and even now it (still) doesn't quite work right. C interop is a mess requiring hacks to generate clang modules to actually get Swift to see them (and CMake for example provides no easy way of doing this, or last time I checked it didn't). Oh and Swift tends to take over the linker and compilation pipelines when you enable it, at least with CMake, because... Reasons? I honestly don't know why. It causes very weird errors when I integrated Swift code into my C++ project that were a pain to actually diagnose. I eventually got it working, but still, it wasn't simple or seamless.

Re: Swift 6.3

#66

I'm glad Chris Lattner moved on and founded Mojo. It's such a cool language with ton of potential.

I was excited about it when it first came out, but haven't heard anything about it since.

Re: Swift 6.3

#67

Earlier quoted context omitted.

The language doesn’t really matter. The underlying SDK/framework is where the action is at. However, I suspect that we may not be too far off, from LLMs being the true cross-platform system. You feed the same requirements, with different targets, and it generates full native apps.

I’m not sure about that but porting libraries from one language to another seems well within their capabilities.

I don't think we're there yet, but I suspect that it's just a matter of time.

It would certainly be quite profitable. Money tends to drive progress.

Re: Swift 6.3

#68
post #13

good to see incredible stuff being shipped in Swift. Haven't used it since v3 though. around 2015-17 - Swift could have easily dethroned Python. it was simple enough - very fast - could plug into the C/C++ ecosystem. Hence all the numeric stuff people were doing in Python powered by C++ libraries could've been done with Swift. the server ecosystem was starting to come to life, even supported by IBM. I think the letdo…

> around 2015-17 - Swift could have easily dethroned Python.

Why could it?

> it was simple enough - very fast - could plug into the C/C++ ecosystem. Hence all the numeric stuff people were doing in Python powered by C++ libraries could've been done with Swift.

Half a dozen languages fit this description.

> the server ecosystem was starting to come to life, even supported by IBM.

No, not at all. Kitura, Vapor (a fitting name) were just a toys that no serious player ever touched.

Re: Swift 6.3

#70
post #30

Earlier quoted context omitted.

> Swift could have easily dethroned Python No way something that compiles as slowly as Swift dethrones Python. Edit: Plus Swift goes directly against the Zen of Python > Explicit is better than implicit. > Namespaces are one honking great idea -- let's do more of those! coupled with shitty LSP support (even to this day) makes code even harder to understand than when you `import *` in Python. Edit 2: To expand a littl…

> Explicit is better than implicit. That's funny. To me magic is implicit by definition and Python strikes me as a very magical language compared to something like Java that is way more explicit.

Magical language how? And you should see what reflection based Java monstrosities do in the background.
Post reply on HN