Reality Vs Reality

In my view, as a MacOS programmer, I still prefer to ask elsewhere for help with purely Apple frameworks, tools (Xcode, IB, etc.), and not load down the discussions in these forums on purely Apple issues. It's not even clear if the relevant folks from Apple staff outside the Swift sphere of influence read this forum enough to be drawn into the discussions.

If we are not careful, we will get users who essentially ask, for example, "I want to build an iOS app that does x,y,z. How do I do it?" It's happening over in the Apple Dev forums, and I'm seeing several incursions here of this type. If a question is about a Swift technology (propertyWrappers, for example) that are used in Apple frameworks, but, are, or could be generally useful to most everyone in the community, then it's appropriate here, even if the context of the problem is in an iOS or macOS context. In my mind, until SwiftUI and Combine are released by Apple to open-source, they should be treated as Apple frameworks. But, this is a gray area since senior members of the development team seem to be more tolerant of these questions herein, probably because these two frameworks are really testbeds for future Swift evolution of the Swift open-source system, even if SwiftUI and Combine remain Apple proprietary.

5 Likes

SwiftUI, Cocoa, are all pretty much off-topic. Using Swift is actually about all other stuffs that’s not framework-specific.

I’m not sure what you’re trying to get at here, it seems contradictory to the previous quote (maybe typo on the first one?).

?

Anyhow, that’d be where the forum is at, not the language. There are a whole lot of other forums out there serving different purposes.

Most off-topic remains visible and it’s simply up to the “community” here to answer the question. Whether or not this forum should bless Apple API and not marking them as off-topic doesn’t seem to help achieving whatever you’re trying to do here.

Also I don’t think it really deters anyone. If anything, most of the off-topic post does get help, or redirected to the relevant forums.

PS

Tbh, there are too many rhetorical questions that it’s barely legible.

3 Likes

You’re probably mostly right about that. But so what? I think you’re misunderstanding the reason things are marked as off-topic. Questions about any (albeit, as you say, these are few and far between) frameworks for non-Apple platforms would also be marked off-topic.

The distinction is not between Apple and non-Apple, but extrinsic and intrinsic to Swift-the-language.

This forum is first and foremost about the development of the language. It is by definition niche, and that’s fine. That’s not the same as saying the language should be—or is—niche, but that discussions about its development is.

Stack overflow is probably a better place to ask questions about using Swift to build apps or whatever.

3 Likes

IBM did great work for Swift, but Kitura had a minority market share in the server side swift community. Vapor is significantly more active.

It's not so much a misunderstanding, the post was called "Reality vs Reality" in acknowledgement of the two realities.

Reality 1 - The scope of this "Using Swift" forum is specifically Swift language only.
Reality 2 - The vast majority of developers "Using Swift" are doing so within the Apple ecosystem.

I'm just wondering how (or whether) this scenario is beneficial for Swift. For example, the traffic in the forum is running at 30 active topics a week. 5 of these are marked as off topic, although technically you could probably double that if those questions relating to non-apple packages like SwiftRealm and Cocoapods (etc) were also marked.

Is Swift ≠ Apple being over emphasised just to make a point?

I'm (also) just wondering whether we could not simply be happy that Apple's adoption of Swift means there is huge developer base available to bring back experience from the trenches back to the language and be more accepting of the obvious connection.

I'm new here, and not trying to ruffle feathers. More like just orienting myself.

Sorry about that, but you did well anyway ;-)

Is that seen as a bad thing?

I would have to let the Core team give the official answer, but, it has been the position that these forums are about Swift and the supporting language infrastructure. UIKit, SwiftUI, Combine, AppKit, how to design an iOS App, macOS App, watchOS app, MVC, and all the other concepts are covered by the Apple infrastructure, third-party resources, and such. In my mind, these types of questions are better answered elsewhere and detract from the Swift-based discussions. Having to teach about AppDelegates, ViewControllers, Views, what is MVC anyway, belongs in another forum.

My view boils down to: if the question is Apple-related and relevant to either Objective-C or Swift, then it should be asked and answered elsewhere.

I guess I'd feel the same way if the question was asked for any platform, and could be asked of any supported language (Qt and C++, C# and .Net)

2 Likes

I don't develop for Apple platforms and have been very pleased to see that questions not directly related to the Swift language are mostly redirected to Apple forums. I think this clearly communicates the purpose of this forum and that Swift is not meant to be just for Apple.

I see the same and it is unfortunate, but I think it will just take time. Allowing Apple platform specific questions on this forum will definitely not communicate the right message if we want to change this.

4 Likes

I think that's the message that was probably intended, but is that the message being communicated? In what way is it saying "not just for"

The actual message being communicated comes across as closer to:

"Using Swift with Apple Frameworks is not welcome here"

I guess that's the angle I'm struggling to rationalise. Why isn't "Using Swift" for "Using Swift in any way it can be (and is being) used".

Is there a danger of throwing away the baby with the bathwater?

2 Likes

Our interest in providing these forums is to serve the community. We host forums for a number of projects that probably otherwise wouldn't have forums at all. That's not true of Apple app development; there are many places you can ask questions about Apple app development where many knowledgable people hang out and are ready to answer those questions, including Stack Exchange and the Apple developer forums. Creating yet another forum for that would just distract people from those places and harm the community.

10 Likes

As someone who uses Swift for non-Apple related projects, and wants to see usage of the language grow in that regard, I am very happy for the current standard of moderation on this topic.

In my opinion this risk is massively overstated. People who are working on projects within the Apple ecosystem essentially have no choice but to use Swift, and I think it's unlikely that any meaningful number of people are being "chased away" from targeting the Apple platform because of how one of their posts has been tagged on this forum. In other words, Swift doesn't need any help to succeed in the Apple use-case.

On the other side, I think one of the biggest obstacles for Swift in reaching its full potential is the fact that it is so closely associated with the Apple ecosystem. There are of course other issues standing in the way of Swift achieving wide adoption in a variety of use-cases - for instance the quality of tooling on non-apple platforms - but in order for those issues to be addressed, it seems almost pre-requisite for there to be developer demand for working with Swift on more diverse use-cases, which requires Swift to have an identity outside iOS.

If this forum opens itself to Apple related content, it's hard to imagine that ever being the case. For instance if you look at the Swift subreddit, content related to iOS (and currently SwiftUI) dominates that forum, and I can understand how someone who visits there will get the impression that Swift is intrinsically linked to the Apple platform. Given the fact that you have cited that the vast majority of Swift code written today is related to that use-case, it's hard to imagine the same thing wouldn't happen here if this forum were open to that type of content.

Of course my stance on this topic is somewhat selfish: as someone who produces software professionally, and who enjoys working with Swift, I would very much like to be able to sell Swift as a viable language choice across a wider variety of projects. I believe that advancing this goal of making our Swift skillsets more valuable in the market is also something which will serve those would-be posters who get their posts flagged for asking a question about SwiftUI and Combine.

3 Likes

I wasn't suggesting that developers would be chased away from the Apple platform, just that those developers could not bring their Swift development discussions here, to the official Swift.org site, if that discussion combines the interaction of Swift with Apple's external frameworks.

That seems like a huge percentage of the Swift development community to be excluded from the discussion. Well, perhaps not excluded, that's probably the wrong word, but certainly restricted and perhaps hampered in terms of the scope of the discussion.

But at least now I understand this to be the intentional position of the site, based on the idea that those developers have other sites available to them. So I can move along now.

Yes, I have the same stance.

I think I just see the situation differently from some others. Specifically I don't see it as a zero sum game where for Swift to be taken seriously as platform agnostic it needs to pretend that it hasn't been wildly successful in the Apple ecosystem.

I don't really buy that. Rather, I think the fact it has had great success stories is something to be acknowledged and celebrated. For example Lyft reducing the size of their codebase by 2/3rds by adopting Swift (from Objective-C), and Kitura enabling 50% cost savings for cloud resource billings are exactly the kind of stories that will bring Swift to the attention of others and make wider adoption more likely, not less.

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.

2 Likes

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