Live data from Hacker News

Apple is open sourcing Swift Build

swift.org

151–160 of 300 posts

Re: Apple is open sourcing Swift Build

#151

Earlier quoted context omitted.

I doubt Apple really cares much about competing with other languages, tooling, or platforms when it comes to Swift or Xcode. They have a completely captured audience and ecosystem, and anything beyond that isn’t even a "best effort" — it's more like, "You're welcome to see if it works for you, but don’t bother us if it doesn't."

a) If Apple didn't care about competition they wouldn't have created Swift. b) They don't have a captured ecosystem at all. You can write iOS/macOS apps using Flutter, React Native etc. All of which are detrimental to Apple because they force apps to adopt a lowest common denominator approach and not use the latest Apple technologies.

> All of which are detrimental to Apple because they force apps to adopt a lowest common denominator approach and not use the latest Apple technologies.

I think you might have this backwards. What you say used to be true back in the days of phonegap, where the hardware was abstracted far away, but all of the frameworks you mention provide pretty easy paths to access new APIs and hardware features. But companies that are drawn to cross-platform tooling already want a uniform experience across devices - and that's why you get the lowest common denominator being used with tools like react native.

Re: Apple is open sourcing Swift Build

#152

Swift is a really cool language. But one thing that blows my mind is that if you ever encounter an "index out of range" error, the (massive) error message that you get doesn't tell you anything about where this error occurred... no line number... no nothing... let a = [1] print(a[1]) Is all you have to do to reproduce the error. The error looks something like that https://pastebin.com/MQV82SaR And gives you no useful…

Swift outside of Xcode is a bit rough around the edges, I think because more attention goes into making Xcode friendly. I opened Xcode, made a new playground, and hit run, the code crashes and highlights the line where the error occurred in red. Not to excuse Swift's jankyness, just saying that the kind of default experience is more an IDE-first design compared to Go's very good unix-first design.

https://monosnap.com/file/qhlwD6aXUW5bcl3TV5lPmKFDgjWDtD

Re: Apple is open sourcing Swift Build

#153
post #82

Earlier quoted context omitted.

> Either they are the best and everyone uses macOS "Best" obviously means different things to different people, but at least by market share, macOS has never been the best. Modern Apple doesn't seem to care about market share outside of the iPhone (and even then, they are still more interested in the iPhone being a premium product than winning on market share). I used to like macOS, 15-20 years ago, but now it's just…

> but now it's just power-user-hostile and considerably more locked down and buggy. Sure, macOS has continued to secure more and more elements of the OS. They have taken a different approach than Windows and Linux, which both keep large swaths of the OS woefully insecure from third-party apps for legacy reasons. But for each and every new lock, there is a key. An incredibly secure OS that gives you the power to contr…

They're also hitting the classic "strategy tax"

When Apple secured the OS from third party, they also purposefully closed the door on deeper third party integration to privilege their ecosystem.

macOS only being half as useful for Android users makes it harder to be the "best" for that swath of users. iPadOS being the only tablet form in the ecosystem will also distance other users etc. They just can't please everyone while locking them in a limited ecosystem.

Re: Apple is open sourcing Swift Build

#154
post #152

Swift is a really cool language. But one thing that blows my mind is that if you ever encounter an "index out of range" error, the (massive) error message that you get doesn't tell you anything about where this error occurred... no line number... no nothing... let a = [1] print(a[1]) Is all you have to do to reproduce the error. The error looks something like that https://pastebin.com/MQV82SaR And gives you no useful…

Swift outside of Xcode is a bit rough around the edges, I think because more attention goes into making Xcode friendly. I opened Xcode, made a new playground, and hit run, the code crashes and highlights the line where the error occurred in red. Not to excuse Swift's jankyness, just saying that the kind of default experience is more an IDE-first design compared to Go's very good unix-first design. https://monosnap.co…

I'm just curious, if I was to run my application on a linux server.

How would I ever know what caused the crash?

when I compile using `swiftc main.swift` and run with `./main`, the error seems even more useless.

all I get is:

    Swift/ContiguousArrayBuffer.swift:600: Fatal error: Index out of range
    zsh: illegal hardware instruction  ./main

Re: Apple is open sourcing Swift Build

#157
post #149
post #36

I believe that this long game of Swift being "good for everything" but "better for Apple platforms" will be detrimental to the language. This does not help the language nor seems to bring more people to the ecosystem. Competitors seems to have a combination of: - Being more open-source - Have more contributors - Have a narrower scope Maybe they should consider open sourcing all the tooling (like Xcode) otherwise the…

I don't get this reaction. Apple: here, we're open-sourcing this previously closed-source Apple-specific thing that made Swift better on Apple platforms. We're moving the Apple stuff into a plugin so Windows and Linux can be equal peers to Apple in the new system. We've implemented preliminary support for Windows & Linux and plan to continue work to bring them up to parity. Hacker News: I believe that this long game…

They should have been fully open source with full linux support and parity since day one.

That would actually help the language get traction. At this point it's a dying language.

Re: Apple is open sourcing Swift Build

#158

Earlier quoted context omitted.

So you haven't heard of Kotlin Multiplatform.

Have heard of it, haven’t investigated it deeply. Looks to still have some of the less-great points of the Java ecosystem on the build side of things (gradle) which is a detractor for me. Kotlin’s syntax is also weird/quirky in some ways.

> Kotlin’s syntax is also weird/quirky in some ways.

I'm curious to learn what you mean by this! :)

Re: Apple is open sourcing Swift Build

#159
post #85

Earlier quoted context omitted.

This feels similar to C# and Microsoft's other CLR/.NET languages. Sure, they've broken away a bit and aren't exclusively used to run things on MS platforms, but still. And Swift is even more tied to Apple, at least to my inexperienced eye. I'm not really an Apple person (Linux, Android), even though I once really enjoyed their hardware... Swift is so far down on my list of languages to look at that I probably will n…

I don't understand what "broken away a bit" means. We use C#/.Net pretty much exclusively to build the backend of our web apps). Most of the devs use Mac, with some Linux. Everything is run in Kubernetes (OpenShift). we use JetBrains Rider as our IDE. C# is a very nice, very performant (faster than Go) language, the platform is mature and robust. the tooling is excellent. It gives you good garbage collection, strong…

If you want to use Visual Studio Code the 'DevKit' extension which provides essential features (language server) is proprietary and requires a Visual Studio licence regardless of platform.

Also I find since C# is an 'enterprise' language developers take the p--s in what they want to charge for, as enterprise will pay as a 'cost of doing business'. Recently FluentAssertions, a freakin test assertion library decided they wanted to charge for newer versions. You don't get that in other languages like Python/Ruby etc.

https://youtu.be/ZFc6jcaM6Ms

Don't get me wrong, C# is my dayjob and I love the language but for personal projects where I don't have the money I'd be hesitant to touch it.

Re: Apple is open sourcing Swift Build

#160
post #152

Earlier quoted context omitted.

Swift outside of Xcode is a bit rough around the edges, I think because more attention goes into making Xcode friendly. I opened Xcode, made a new playground, and hit run, the code crashes and highlights the line where the error occurred in red. Not to excuse Swift's jankyness, just saying that the kind of default experience is more an IDE-first design compared to Go's very good unix-first design. https://monosnap.co…

I'm just curious, if I was to run my application on a linux server. How would I ever know what caused the crash? when I compile using `swiftc main.swift` and run with `./main`, the error seems even more useless. all I get is: Swift/ContiguousArrayBuffer.swift:600: Fatal error: Index out of range zsh: illegal hardware instruction ./main

I don't know, I write Swift on a Mac targeting macOS or iOS. I usually have Xcode open to build/run/debug and for documentation lookup, and alternate between that and VSCode for actually writing the code; worst thing about Xcode for me is the find-replace, that's probably the biggest reason I keep VSCode open.
Post reply on HN