Reality Vs Reality

Are topics getting marked as offtopic when there is an interaction of Swift with Apple's external frameworks? I don't think so. Examples:

If you look at the topics marked offtopic you will see that basically all of them are only about the frameworks, not the language, and before SwiftUI and Combine came out almost all of those questions could've been rewritten as obj-c questions because there were no interactions with the language itself.

I don't think it is beneficial to post example vs counter-example as that risks the act of point scoring outscoring the point.

I don't see Interactive forums in the same way as, for example, newsgroups. Newsgroups tend to be more linear in that all posts receive at least a glance or perhaps a mention in a digest, whereas forums tend to be more ad-hoc, dip-in and dip-out.

The public interface to this forum is its landing page, which lists the most recent topics along with indicators of the engagement and badges relating to the subjects.

Around the time of my posting this topic, five of the recent topics had badges indicating they were off-topic.

Perhaps I was a little pre-armed to home in on this as I had come to this site after visiting Ask Different (a stack exchange site) where I had previously asked a question about attempting Swift development using Cocoa but without requiring Xcode. The question was flagged as off-topic there and marked down, twice. My requests for the specifics of the nature of the problem with the question went unanswered.

Maybe that was a contributing factor, but either way the observation here was still tangible. Several recent topics were marked as off-topic, it got my attention, and on looking into those, it was because the issue was framework related rather than language specific.

@John_McCall's answer confirms this is an intent of the forum, although I have also observed it is moderation with a light touch, and some of those topics have received still received support.

As I said in another reply, I wasn't looking to ruffle feathers, just exploring the protocol.

In general, the other moderators and I try to delist off-topic threads so that they don't show up in the recent topics list. But we usually won't delist a thread where a discussion has broken out, and I personally don't like to delist threads where somebody's already put a lot of effort into a reply. As you say, we try to use a light touch.


I think it's good to keep Swift as non-Apple-centric as possible; it's a good language with a lot of neat features and a simple, clean syntax.

Meanwhile, developing on Apple platforms is truly a joyless experience. Everything is so locked-down that you can't just start with an idea in the morning and hack together a prototype by the afternoon.

Today, for example - I wanted to write a key-mapper for MFI gamepads (since OSX now supports PS4 controllers). I thought it would be easy; just listen for events using the GameController framework and send the mapped keyboard/mouse events in response. Except that you only get access to those controllers if your App is sandboxed, and if it has the appropriate entitlements (something that Apple apparently forgot to document). GUI applications won't receive updates if they're not in the foreground, so that's no good, and getting a sandboxed CLI application set up with an Info.plist is incredibly frustrating (_libsecinit_appsandbox just crashes with no message, and the Console output has all possibly-useful information masked out). Maybe I could find another workaround - spawning a thread from the GUI app or using an XPC service or something, but by this point I've spent half a day fighting the system and my enthusiasm for the project has all but been drained.

All of this is to say: Swift is a really nice language, and if anything it is held back by how difficult it has become in recent years to write applications for Apple's platforms. Whenever I have a little project like the one I described, I would happily use Swift to implement it - but I hesitate whenever that means touching an Apple system framework, because that often means you should expect some pain.

I'm really hoping for a stable WASM port in the near future. I think Swift would be a much nicer alternative than C/C++/Rust for people who are currently writing Javascript, and a user-base of that size could help to dilute how Apple-centric the language currently is in practice.

1 Like

I enjoyed reading your post (sincerely), and I appreciated and recognised every point you expressed.

As a post, it's an excellent Chapter 1.

But stories are composed of many chapters with plot twists and turns.

I've now been a developer for over 40 years. In some fields, long ago, I was proclaimed an expert, in a limited subset, yet despite this determined and hard earned achievement, I would assess my own knowledge of commercial IT matters at around 0.001% And that is likely a generous assessment. I still learn something new from almost each and every post I read in the forums I engage in.

If I had to single out one characteristic as the secret to what keeps me motivated, active and engaged in this fantastic field it would be this: Fearless.

Being fearless means being able to throw away strongly believed notions in order to absorb and (ultimately) thrive in new found continually expanding frontiers.

We already lived through the days of unrestricted access to mouse and keyboard (and other) events. Those were days where an 18 year old French student wrote an Android App that silently sent SMS messages to a premium messaging service and drained €150,000 from its users mobile accounts. But that is just pocket change when compared to the $300B that has been stolen from users by background processes monitoring keystrokes to gain access to online bank accounts. And even that's just money, which is nothing compared to the lives that have been lost thanks to zero-day.

The OS is now the gatekeeper. It ceased being the users (and programmers) slave a long time ago. The OS must now protect users from their own ignorance and as developers who want to play in this new world, we must learn how to respect the users rights not to be conned and screwed into bankruptcy.

An irony of your post is that you were unable to find a relevant support forum to help you resolve your difficulties, to understand why all these restrictions exist and how to play nicely with them. A forum where you could discuss how to interact with these overbearing (modern) frameworks using Swift. It was a similar thought that prompted me to start this topic. For sure we can treat Swift as yet another Haskell, but sooner or later we have to grab it by the monads and deliver stuff. However, I have now (fearlessly and humbly) accepted that this is not that place. :pray:t2:

Please be assured, my love of the language is every bit as strong as yours, and this reply is intended in good spirit.

1 Like

While I've found both of the last two posts interesting, I think they've gotten a little afield of the topic of this thread, which seems to have reached the limit of its usefulness.

1 Like