I really miss Objective-C, and in the world of Swift craziness [1] I'm reminded often of this blog post [2] wondering what would have happened if Apple hadn't encountered Second System Syndrome for its recommended language.

(There's a decent argument it encountered it in iOS and macOS too.)

[1] https://github.com/swiftlang/swift-evolution/blob/main/propo... -- apologies to the authors, but even as a previous C++ guy, my brain twisted at that. Inside Swift is a slim language waiting to get out... and that slim language is just a safer Objective C.

[2] https://medium.com/goodones/pareto-optimal-apple-devtools-b4...

Obj-C’s simplicity can be nice, but on the other hand I don’t miss having to bring in a laundry list of CocoaPods to have features that are standard in Swift. I don’t miss maintaining header files or having to operate in old codebases that badly manage Obj-C’s looseness either.

You can simply import Swift packages and either they expose an Objc interface or you can provide it yourself – by wrapping it in Swift and exposing the things you need via @objc etc. You can - at the same time - also hide the wrapped framework and make it an impl. detail of the wrapper so that you could switch the wrapped framework while keeping your app code mostly stable. This also reduces the number of imported symbols… import 3rdPartyFramework imports all symbols, extensions, classes, types etc. vs. import MyWrapper only brings in the things you really need.

>[1] https://github.com/swiftlang/swift-evolution/blob/main/propo... -- apologies to the authors, but even as a previous C++ guy, my brain twisted at that. Inside Swift is a slim language waiting to get out... and that slim language is just a safer Objective C.

These kinds of features are not intended for use in daily application development. They're systems-language features designed for building high performance, safe, very-low-level code. It will be entirely optional for the average Swift developer to learn how to use these features, just in the same way that it's optional for someone to learn Rust.

The "Swift has too many keywords now" meme makes me want to go insane. The vast majority of Swift code never runs into any of that stuff; so, what advocates of it are saying is in effect "we don't want Swift to expand into these new areas (that it has potential to be really good at) even if it's in a way that doesn't affect current uses at all."

That said, the Swift 6 / Strict Concurrency transitions truly have been rough and confusing. It's not super clear to me that much of it could have been avoided (maybe if the value of Approachable Concurrency mode had been understood to be important from the beginning?), and the benefits are real, but my gut feeling is that a lot of the "Swift is too complicated" stuff is probably just misplaced annoyance at this.

Swift's concurrency story is what happens when a multi-year project meets Apple's fixed six month Swift release timeline. And being written by highly knowledgeable but low level engineers who've never written an iOS app in their life, means that there was a huge approachability hole they've only recently worked their way out of, but even that has major issues (MainActor default on in Xcode but not Swift itself).

Such a mess. You can tell the people that designed it never wrote a client or an app in their lives. It is pure academic pendatry in display.

I go back and forth. I do miss the simplicity of objc at times though. I think in a short amount of time someone can become close to an expert in objc. Swift is already incredibly complicated and there's no end in sight.

A few years from now O'reilly will publish a bestseller called Swift: The Good Parts

I hate how pendantic and useless some of the features of swift being pushed down by academics that don't write apps or services themselves.

Simple example:

Objective-C

if myObject {

}

in swift if myObject != nil {

}

Also opitionals in swift could have totally be avoided if they adopted a prototype based langue (basically object are never nil). Lua did this, and it is very elegant

But meanwhile, we got a half backed optional system, which is backwards (similiar to Java), and didn't help with the practicality of the language at all, and meanwhile you still can crash an app doing myArray[1]

  > you still can crash an app doing myArray[1]
the first thing i do when starting a new project:

  extension Array {
      subscript(safe: Int) -> Element? { ... }
  }
there was talk in the swift forms about adding that as standard that but it seems to have died off...

[0] https://forums.swift.org/t/draft-adding-safe-indexing-to-arr...

> Inside Swift is a slim language waiting to get out... and that slim language is just a safer Objective C.

Rust? Rust is basically a simpler Swift. The objective-c bindings are really nice too, and when you're working with obj-c you don't have have worry about lifetimes too much, because you can lean on the objective-c runtime's reference counting.

I think the way to think about it is that with Rust, it's as if all the goodness in Swift was implemented with in the "C" level, and the Objective-C but is still just library-level a runtime layer on top. Whereas Swift brings it's own runtime which greatly complicates things.

I would absolutely not call Rust a simpler Swift. Swift doesn't have and ownership/borrowing system, explicit lifetime for objects, much more expressive (and therefore complex) macro support...

I get that there's a tradeoff. Rust requires you to be way more explicit about what you're intending upfront and that can, in the long term, lead to simpler code -- but there's no dimension (depth-wise or breadth-wise) that I'd call Rust simpler.

> I would absolutely not call Rust a simpler Swift. Swift doesn't have and ownership/borrowing system

Swift already does have those things but unlike Rust, they are opt-in.

Not going to argue which language is simpler, but sorry, you don't seem like someone who knows Swift very well.

While Swift now has the `borrowing` and `consuming` keywords, support for storing references is nonexistent, and the only way to return/store `Span`s, etc, is only possible through using experimental `@lifetime` annotations.

Swift is a nice language, and it's new support for the bare necessity of affine types is a good step forward, but it's not at all comparable with Rust.

Rust is still more complicated than Swift, but you needn't worry - the Swift team is flexing their muscles hard to ensure that Swift becomes the biggest, most complicated language on Earth and wins the complexity, cognitive burden and snail performance once and for all eternity. Their compiler already times out on the language, soon even an M7 will also give up.

One of my recurring language design hot takes is that it's easier to design for speed and then make it easy to use than it is to make it easy to use and then try to speed it up.

C++ is trying to make C easier to use for 40 years, and it's still not there. So I wouldn't call that easier.

how would you write something like

    #include <print>
    #include <map>
    #include <string>

    int main(int argc, char** argv) 
    {
      using namespace std::literals;

      std::string foo = "foo:";
      foo += argv[0];

      std::map<std::string, int> m{
        {foo, 123}
      , {"count: "s + std::to_string(argc), 456}
      };

      std::println("{}", m);
    }
in C

C++ is trying to make something EASIER to use?

C++ if any made C user friendly.

Except the entire design of swift is meant to make everything more automated.

* automated exclusivity with value types and value witness tables, classes as arc types (ie Arc<Mutex<T>>)

* automated interop with C/C++/Obj-C through the clang ast importer

Maybe they could have started with rust and added on what they needed, but why not build a new language at that point where things so fundamental are involved?

Source: I worked in lattners org at the time of swifts inception (on an unrelated backend) but that was the motivation. I also worked on the swift compiler for a little bit some years later on in my career.