News for hackers. Stuff that matters.
Re:Mixing Swift and C++ by bsaul on Sunday July 23, 2023 @01:30PM (#36837554)
Currently developing both in swift and go and i have the exact inverse feeling.

Go seems to have been developped by true masters that really understand that less is more. They've also kept a laser sharp focus on working on things that really matters and took the time to do things right.

Swift on the other hand looks like more and more bloated every day, without adressing the main pain points of the experience of coding in swift in the real world.

Re:Mixing Swift and C++ by saagarjha on Sunday July 23, 2023 @01:42PM (#36837701)
Depends on what you think they’re masters of. Developer experience? Sure. Modern programming languages design? Absolutely not.
Re:Mixing Swift and C++ by tempodox on Sunday July 23, 2023 @02:35PM (#36838261)
I think Go is made for writing a certain kind of software that is important for Google, and for a certain kind of developer Google wants to have writing this software. That the result is not the kind of language I would want to use is immaterial. I'm quite sure Go is masterfully targeted for the purposes Google wants it for.
Re:Mixing Swift and C++ by pjmlp on Sunday July 23, 2023 @03:20PM (#36838718)
Go was designed by a couple of well known UNIX folks that dislike C++.

With exception of Kubernetes, most of Google's software keeps being written in Java, C++, Kotlin, and nowadays Rust.

Its use is much more widespread outside Mountain View walls than inside them.

Re:Mixing Swift and C++ by seabrookmx on Sunday July 23, 2023 @04:30PM (#36839507)
And remember that unlike Amazon does with AWS, Google doesn't use GCP/Kubernetes to run it's infrastructure.

Google's software runs on Borg, which is _not_ written in GoLang.

Google's three OS projects all eschew GoLang as well.

Re:Mixing Swift and C++ by slinkyavenger on Sunday July 23, 2023 @07:45PM (#36841246)
Both criticisms are pointless -

1. Borg precedes K8s and likely is tightly coupled with Google's backend infra - that's to say, Borg gets architected around Google's existing workflow and new backend development is written around Borg's workflow.

2. GoLang was never intended to be an OS-level programming language. It was created to enable more robust, efficient, and rapid development in a particular space. It would be just as silly to argue that Google's three OS projects all eschew Dart.

Re:Mixing Swift and C++ by vips7L on Sunday July 23, 2023 @08:41PM (#36841622)
Isn’t Fuchsia designed to use Dart for the front end?
Re:Mixing Swift and C++ by seabrookmx on Sunday July 23, 2023 @09:15PM (#36841871)
I'm not actually criticizing GoLang, just pointing out some facts.

1. is fair.

2. I'd argue is false, given Fuschia and Dart are tightly integrated (as another commenter noted) and that GoLang was originally designed as a C++ replacement born from the Plan9/Inferno tool chains (certainly "OS-level"). Also there's a ton of non-kernel code in an OS so this is a really blurry distinction. containerd does some pretty low level stuff with Linux and GoLang is perfectly capable of this.. if Fuschia wanted to use it they could.

Re:Mixing Swift and C++ by pjmlp on Monday July 24, 2023 @01:04AM (#36843291)
In fact, Fuchsia's original TCP/IP stack and volume manager were written in Go.

They were however rewritten in Rust, after the author left Google and they wanted to clean Fuchsia from Go code.

Re:Mixing Swift and C++ by pjmlp on Monday July 24, 2023 @12:58AM (#36843253)
Flutter/Dart is Fuchsia's UI framework.

Go was created by three folks that got fed up waiting on C++ compile times, and from their point of view Go is designed for people unable to take feature rich languages, on Rob Pike's own words.

"The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt."

Or alternatively,

"It must be familiar, roughly C-like. Programmers working at Google are early in their careers and are most familiar with procedural languages, particularly from the C family. The need to get programmers productive quickly in a new language means that the language cannot be too radical."

Re:Mixing Swift and C++ by Someone on Sunday July 23, 2023 @01:50PM (#36837797)
But developer experience is a factor that should weigh heavily in evaluating the quality of a programming language.

I also fear Swift is going a step too far. For example, IMO Swift's compilation speed isn’t good enough.

If that’s a matter of lack of tooling, I won’t blame the language, but is it, or is its slowness unavoidable for a language that is so flexible? If the latter, I would rather have a bit less flexibility and more compilation speed.

Similarly, there’s quality of error messages. Swift has gotten better there, but still has some weird ones. Are they unavoidable for the current language?

Re:Mixing Swift and C++ by cvwright on Sunday July 23, 2023 @02:31PM (#36838220)
I would be fine with slow, if the Swift compiler could actually compile all valid Swift programs. It’s pretty commonplace for me to have to break a large or complicated function into smaller bite-size pieces because the compiler can’t type check it all at once.
Re:Mixing Swift and C++ by refulgentis on Sunday July 23, 2023 @02:50PM (#36838416)
I had several years in the ObjC ecosystem, embraced Swift whole-heartedly immediately at 1.0, and was surprised by people nitpicking like this.

It's been humbling to come back to it over the intervening 7 years and realize they weren't nitpicks that would be resolved shortly, and people would understand if they just read the swift-evolution mailing list. They were fundamental flaws.

Re:Mixing Swift and C++ by novok on Sunday July 23, 2023 @03:45PM (#36839013)
If they removed the few small features that are responsible for 80% of the slowness and called it optimized swift I bet many would embrace it fairly quickly, especially considering they are functionally cosmetic features.
Re:Mixing Swift and C++ by math_dandy on Sunday July 23, 2023 @04:22PM (#36839435)
When will “Swift: The Good Parts” be available for preorder?
Re:Mixing Swift and C++ by saagarjha on Sunday July 23, 2023 @05:37PM (#36840121)
Not really. These are pretty critical features for the language.
Re:Mixing Swift and C++ by refulgentis on Sunday July 23, 2023 @06:10PM (#36840393)
Not type inference, rather, whatever is so pathological about the fundamental algorithm for doing Swift type inference that it can become an infinite loop.

This is a Swift-only feature in major languages with type inference.

Re:Mixing Swift and C++ by novok on Monday July 24, 2023 @01:53AM (#36843583)
> Primary-file mode's advantages are that the driver can do incremental compilation by only running frontends for files that it thinks are out of date, as well as running multiple frontend jobs in parallel, making use of multiple cores. Its disadvantage is that each frontend job has to read all the source files in the module before focusing on its primary-files of interest, which means that a portion of the frontend job's work is being done quadratically in the number of jobs. Usually this portion is relatively small and fast, but because it's quadratic, it can easily go wrong. The addition of batch mode was specifically to eliminate this quadratic increase in early work.

One example that would improve the above: replace module imports with file specific imports, including within the module itself. You could also make a case for operator overloading and there are probably a bunch of candidates a swift compiler engineer could tell you that would be small but significant like that.

https://github.com/apple/swift/blob/main/docs/CompilerPerfor...

Re:Mixing Swift and C++ by jwells89 on Sunday July 23, 2023 @04:14PM (#36839338)
This used to irritate me, but now that I'm in the habit of breaking functions up I've come to prefer it. It makes for code that's easier for myself to read and follow further down the road, which I think is a reasonable proxy for readability by others.
Re:Mixing Swift and C++ by cachvico on Sunday July 23, 2023 @04:32PM (#36839523)
Writing modular code is good but that's a ridiculous reason to need to do so.

Xcode also trips on simple type errors and sometimes fails to even provide a line number where the error lies. As someone who just wrote a Swift app after no prior exposure, it's oddly immature in some basic ways after nearly a decade from launch.

Re:Mixing Swift and C++ by jwells89 on Sunday July 23, 2023 @04:46PM (#36839657)
Yeah I won’t defend it too much, Xcode/SourceKit/etc are clearly written in a way that assumes devs are writing perfectly idiomatic, smell-free code which isn’t very aligned with reality. I’ve more or less got a feel for what makes it grumpy so I don’t trip it up too often any more but it’s annoying on the odd occasion I do.
Re:Mixing Swift and C++ by cvwright on Monday July 24, 2023 @08:47AM (#36847114)
Yeah this is a major pet peeve. Especially when the compiler crashes. Growing up writing in C, I didn’t even know that was a thing.
Re:Mixing Swift and C++ by newZWhoDis on Sunday July 23, 2023 @04:36PM (#36839564)
If you are writing functions that the current/latest Swift compiler can’t handle on modern hardware then I feel sorry for anyone who has to someday read your code.
Re:Mixing Swift and C++ by bsaul on Sunday July 23, 2023 @06:53PM (#36840812)
just try using state machines modelled with enums and you'll fairly quickly reach those limits.
Re:Mixing Swift and C++ by dagmx on Sunday July 23, 2023 @02:11PM (#36838031)
When discussing compiler speed, Go specifically prioritizes compilation speed over optimization of the resulting code.

Swift and Rust both suffer from slower compilation than Go, primarily because LLVM prioritizes optimization over speed.

There are of course other reasons like complexity of language, size of compilation units etc… but optimization tends to be the biggest hit in my experience.

Hence why Rust is adopting/investigating cranelift as a debug compiler to improve speed.

Re:Mixing Swift and C++ by Someone on Sunday July 23, 2023 @03:57PM (#36839155)
> There are of course other reasons like complexity of language, size of compilation units etc… but optimization tends to be the biggest hit in my experience.

I guess you don’t have much experience with Swift. LLVM code generation may be slower than alternatives, but that’s more or less by a constant factor.

Swift’s type inference, on the other hand, can lead to a combinatorial explosion.

For example, https://www.hackingwithswift.com/articles/11/how-to-make-swi... claims that

  let sum = [1, 2, 3].map {
    String($0)
  }.flatMap {
    Int($0)
  }.reduce(0, +)
takes over 11 seconds to compile, while

compare this code:

  let sum = [1, 2, 3].map { (num: Int) -> String in
    String(num)
  }.flatMap { (str: String) -> Int? in
    Int(str)
  }.reduce(0, +)
takes about 75ms, and

  let numbers = [1, 2, 3]
  let stringNumbers = numbers.map {
    String($0)
  }
  let intNumbers = stringNumbers.flatMap {
    Int($0)
  }
  let sum = intNumbers.reduce(0, +)
compiles in 71ms.

Of course, all of these use LLVM, and likely even generate highly similar intermediate code.

Also, you’ll see these slowdowns even in debug builds that don’t ask LLVM to optimize code much.

Re:Mixing Swift and C++ by dagmx on Sunday July 23, 2023 @06:14PM (#36840415)
Pretty rude to start your comment with the assumption that I’m not experienced with Swift. The rest of your comment would be more useful without the unnecessary condescension.

But nothing you said contradicts what I said either. Yes it’s easy to get into slow paths with Swift, but it’s also easy not to. Granted it takes a lot of up front knowledge to do so.

But even if you just stick to the LLVM portion, llvms debug mode is slower than cranelift and other toolchains debug modes. Debug doesn’t mean “no optimizations” whatsoever, nor does it mean efficient paths through the toolchain either.

Re:Mixing Swift and C++ by ori_b on Sunday July 23, 2023 @02:09PM (#36837999)
What is the purpose of modern language design, if not to improve developer experience?
Re:Mixing Swift and C++ by jb1991 on Sunday July 23, 2023 @02:14PM (#36838054)
It's a subjective issue, but sometimes the end results can be better even if the experience of getting there is not as nice as a simpler language that is more bug-prone. Consider Rust, which is notoriously difficult to learn, but that offers improved end results in many cases re: security, safety, reliability.
Re:Mixing Swift and C++ by ori_b on Sunday July 23, 2023 @02:34PM (#36838248)
Can you explain how that's not an aspect of developer experience? It seems to be like trading off between type system correctness (you can go all the way to needing full formal proofs of correctness, resource use, etc) and ease of getting stuff done is the core of developer experience.
Re:Mixing Swift and C++ by worik on Sunday July 23, 2023 @03:19PM (#36838709)
With Rust it is the learning curve that is hard.

I find every other aspect of "developer experience" excellent

Re:Mixing Swift and C++ by jb1991 on Sunday July 23, 2023 @03:27PM (#36838798)
Does your idea of a good developer experience include programs that are reliable, won't crash in production, won't be compromised, and save you lots of time later on so you can just focus on writing code the first time? In the absence of these guarantees, your developer experience can include some very frustrating and/or stressful debugging.
Re:Mixing Swift and C++ by ori_b on Sunday July 23, 2023 @03:51PM (#36839088)
Yes. Does yours not?

Tools like Agda, Spark, Idris, and Coq move the tradeoff around towards "probably correct", and I welcome seeing some of their features become gradually available. Getting things right the first time is useful.

But these features can also make it hard to get anything done quickly.

Good developer experience means finding a balance between the quick and dirty, and the provably correct.

Re:Mixing Swift and C++ by jb1991 on Sunday July 23, 2023 @03:55PM (#36839130)
You just made my point for me.
Re:Mixing Swift and C++ by ori_b on Monday July 24, 2023 @07:21AM (#36846070)
Was your point that you agree with me? If not, I don't get it.
Re:Mixing Swift and C++ by saagarjha on Sunday July 23, 2023 @03:00PM (#36838517)
Developer experience is just one facet of writing software. It means that it is pleasant to write code, but you can also focus on:

* Language features that make it so that you don't have to write code at all

* Tooling that makes it easier to find bugs in the code you do write

* Expressiveness and portability that allows the code to be used in more places

* Approachability, so that new people can pick up the language quickly

* "Batteries", so that people can rely on your high-quality libraries instead of having to manage their own

* Documentation and community, to handle the hardest parts of programming: people

* Performance, so that the code can use fewer resources

…among many other things.

Re:Mixing Swift and C++ by geodel on Sunday July 23, 2023 @03:04PM (#36838567)
Same as purpose of modern arts. True masters know its worth. Will it look good in my living room? Doesn't matter.
Re:Mixing Swift and C++ by jb1991 on Sunday July 23, 2023 @02:12PM (#36838037)
What pain points are you referring to? Beyond the lack of meaningful cross-platform abilities, what "real world" issues do you find painful in Swift?
Re:Mixing Swift and C++ by bsaul on Sunday July 23, 2023 @03:13PM (#36838649)
indeed that would be number 1 by a VERY high margin. It's pretty ridiculous to start with "world domination" as an objective and end up 10 years later without a portable stdlib (aka foundation).

Another issue would be a coherent concurrency system. Today we have a mix of gcd and actor system, declarative task, async await, etc which when put together makes me totally unable to understand what's going on in a real world program, unless you're doing like i do in my team : i specifically ban all modern concurrency apis in favor of the old ones.

The same could be said with protocol extension + generics + class + structs.

For each problem, there are approximately 4 possible designs with subtle tradeoffs. Swift team advocates for "expressiveness". My personnal experience is that all patterns and technics will ultimately end up showing in the codebase, depending on the mood of the developer.

In the end, i've started to do like C++ developers end up doing : write guidelines on which language features are allowed, and which are forbidden.

Compare that to go, where there's (at most) one satisfying way to design the problem in the typesystem. As a sideeffect people have to think more about the problem they're trying to solve, and how to simplify it to the maximum.

The end result is that go pushes you toward simple and maintainable code. Swift pushes you toward being fancy for no good reasons.

Re:Mixing Swift and C++ by KerrAvon on Sunday July 23, 2023 @03:41PM (#36838963)
It doesn’t sound like you actually understand Swift or the Mac platform you claim it’s tied to.

(a) Foundation is portable and available on Windows and Linux.

(b) You are confusing language features and OS features. Async/await is part of the language. GCD is part of the OS.

(c) Banning modern concurrency primitives is not viable forever — you’ll be left behind as the native APIs adopt them.

Re:Mixing Swift and C++ by bsaul on Sunday July 23, 2023 @07:10PM (#36840923)
a : https://github.com/apple/swift-corelibs-foundation/blob/main...

I wouldn't want to be the guy relying on this table advancement for his own project. The fact that they're rewriting it in pure swift probably says a lot about the quality of the current approach.

b: makes absolutely no difference from a developer perspective. if you want to run threads in swift you're going to use gcd.

c: my take with all apple software tech has been to wait until they've dogfooded their own tech long enough to make it useable. Worked very well for me so far, thank you very much.

Re:Mixing Swift and C++ by jb1991 on Sunday July 23, 2023 @03:30PM (#36838826)
> protocol extension + generics + class + structs

you are referring to basic languauge features... you consider classes and structs pain points? these are the basic building blocks of the language, if you find them painful this is definitely not the language for you.

Re:Mixing Swift and C++ by bsaul on Monday July 24, 2023 @03:21AM (#36844135)
protocol extension adds another axis of design, with all its new gotcha ( pat , overrides, etc)

It looks great on paper and do enable beautiful designs in some cases. But after tasting languages like go you realize you can get away with struct & functions in 99% of the cases, and that having less design options is actually a plus. It lets you focus on what really matters : domain modeling.

Re:Mixing Swift and C++ by jb1991 on Monday July 24, 2023 @07:12AM (#36845971)
It's a lot more than "looks great on paper." My suspicion is that you have not really used and benefited from these features in a non-trivial way or you'd understand why they are there.
Re:Mixing Swift and C++ by slavapestov on Sunday July 23, 2023 @04:07PM (#36839250)
> Another issue would be a coherent concurrency system. Today we have a mix of gcd and actor system, declarative task, async await, etc which when put together makes me totally unable to understand what's going on in a real world program, unless you're doing like i do in my team : i specifically ban all modern concurrency apis in favor of the old ones.

There’s a layering:

- gcd is the lowest level

- async/await lets you write tasks with suspension points (they wait for events to happen); but an async function is still conceptually executed serially

- the Task API let’s you spin up async functions into various arrangements of parallel tasks and wait for those tasks to complete

- ‘async let’ is sugar for creating a Task to compute a single expression

- for async functions and Tasks to share data there is a Sendable model and various static isolation checks

- actors build on everything else; actors are classes whose state is completely isolated to the actor, and all method calls are posted on the actor’s executor

Memory-safe concurrency is hard. There’s a lot of ground to cover to replace the kind of things people do with shared state concurrency, and just actors alone are not enough.

> Compare that to go, where there's (at most) one satisfying way to design the problem in the typesystem. As a sideeffect people have to think more about the problem they're trying to solve, and how to simplify it to the maximum.

I like the aesthetics of small languages too, but I think Go picked the wrong small subset. It reminds me of Java in the 1.x days, for x <= 4, where the language had fundamental expressiveness constraints that created a huge amount of unavoidable boilerplate and type unsafety in even the most basic programming situations.

Re:Mixing Swift and C++ by bsaul on Sunday July 23, 2023 @04:35PM (#36839550)
"... reminds me of java"

i was having doubts before go introduced generics. But the fact that they managed to add it so perfectly while maintaining the unambiguous focus on simplicity and structs made me confident they've really nailed it.

The only feature i don't get why they haven't added yet is proper enum to get some kind of ADT. It looks super orthogonal to the language and quite convenient. However at this point i fully trust their taste. If they think it's going to lead to catastrophic design decisions, i fully believe them.

Re:Mixing Swift and C++ by pjmlp on Monday July 24, 2023 @03:42AM (#36844288)
Go generics are far from perfect, and while they finally sort out a major paint point, they still leave some room for improvements.
Re:Mixing Swift and C++ by bsaul on Monday July 24, 2023 @08:27AM (#36846862)
They do, but i'm super relieved they managed to add it to the language while not changing its focus and general feeling.

It really feels like a refactoring tool rather than a new design tool : you still think mostly about functions and structs and don't get carried by "is x a kind of y" kinds of discussion.

Re:Mixing Swift and C++ by fauigerzigerk on Sunday July 23, 2023 @04:14PM (#36839340)
It seems to me that their threshold for introducing new language features is extremely low. If something cannot be made to look flawlessly pretty using existing syntax they will go to any length to fix it, regardless of how much extra complexity they have to introduce.

Result builders are a case in point. Essentially, they didn't like the bracket and the comma between array items in the special case where a function returns only a single array.

  // So rather than this
  let items = makeUgly {
    [
      Item("One"),
      Item("Two"),
      Item("Three")
    ]
  }

  // It had to look like this
  let items = makePretty {
    Item("One")
    Item("Two")
    Item("Three")
  }
Yes, it's prettier. There's a bit less clutter. But there's a cost too. makePretty uses entirely different language semantics without any syntactical clue at the call site.

So now there are essentially two separate syntax modes in Swift, and every time you look at some code you have to make up your mind on whether to read it in normal mode or in result builder mode. Sometimes that's easy to know in context. But it's another thing you have to pay attention to at all times.

Re:Mixing Swift and C++ by bsaul on Sunday July 23, 2023 @04:39PM (#36839596)
I feel swift really makes it impossible to learn as a language. The number of idioms has grown exponentially at the detriment of orthogonality. I think the red line was crossed with result builders indeed.

Looks like a manager once said "we've got to look like jsx/html, now !" and the poor devs had to obey. It makes absolutely no sense from a language design POV.

Re:Mixing Swift and C++ by pjmlp on Monday July 24, 2023 @03:41AM (#36844281)
Apple never said anything about "world domination" outside their ecosystem.

I guess you never looked into Kubernetes and their blobs of generated code to work around Go's weaknesses.

Re:Mixing Swift and C++ by frou_dh on Monday July 24, 2023 @05:13AM (#36844949)
It was Chris Lattner that used the phrase "world domination" and would even clarify that although it sounded like a joke, he was fairly serious about it.
Re:Mixing Swift and C++ by pjmlp on Monday July 24, 2023 @06:43AM (#36845699)
His influence on Swift's stewardship ended the day he decided to leave Apple.
Re:Mixing Swift and C++ by bsaul on Monday July 24, 2023 @06:41PM (#36855259)
i think the day he left was also the day swift lost its focus.
Re:Mixing Swift and C++ by pjmlp on Tuesday July 25, 2023 @02:04AM (#36858536)
Swift focus is quite clear, replace C, C++ and Objective-C on Apple ecosystem, it is even stated on its official documentation.

As such it should provide comparable level of flexibility, tooling and developer power.

Anything else isn't part of swift focus.

Re:Mixing Swift and C++ by bsaul on Monday July 24, 2023 @06:40PM (#36855249)
Indeed i haven't ( although i've heard about it).

However i have yet to see any swift codebase of comparable complexity. So, the jury is still out on which language enable the largest scale.

Re:Mixing Swift and C++ by SubjectToChange on Sunday July 23, 2023 @06:18PM (#36840475)
Go seems to have been developped by true masters that really understand that less is more.

"The key point here is our programmers are Googlers, they're not researchers. They're typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They're not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt." - Rob Pike

Ignoring complexity on the language level simply passes the buck to application code, and developers end up paying that price across the ecosystem in perpetuity.

They've also kept a laser sharp focus on working on things that really matters and took the time to do things right.

Go's async model is underspecified, its implementation of generics incurs runtime overhead, much of the "wonderful tooling" only exists because of severe shortcomings in the language design and/or compiler implementation, its FFI is... difficult, etc.

To be blunt, the values that Go embraces are none of the values I seek in a programming language or community. And I feel sorry for anyone too heavily invested in Go to turn back.

Re:Mixing Swift and C++ by bsaul on Sunday July 23, 2023 @06:50PM (#36840791)
golang concurrent programming is by far the best i've ever used for its application domain which is mainly infrastructure middlewares running in a connected environment.

The tradeof between language features and maintainability is also IMHO the best in class. Never before have i ever looked at a stdlib sourcecode and told myself "hu, yeah i see how that works".

Re:Mixing Swift and C++ by jstimpfle on Monday July 24, 2023 @06:46AM (#36845723)
I'll offer a different take: Thinking that complexity can be offloaded into the language is not seeing the whole picture.

Offloading complexity into the language works for the simple cases, but the more one is trying to fit a solution into a physical box with physical constraints, and the more flexibility is required from the business logic, the situation will change in such a way that more control about the specific of the solution becomes a requirement, and the language shortcuts will fit less and less, to the point where they become a liability. Doubly so if it is difficult or impossible to unwrap the layers of language features.

Of course, many problems can be solved with just a few Python scripts, or even with a huge pile of them. On the other hand, we can find a possible explanation why it could make sense for some teams to code huge apps in low-level languages (C or C++) or languages with few language features (e.g. Golang), or even to try and control the whole stack by maintaining their own language infrastructure.

Re:Mixing Swift and C++ by SubjectToChange on Monday July 24, 2023 @04:58PM (#36854103)
the situation will change in such a way that more control about the specific of the solution becomes a requirement, and the language shortcuts will fit less and less, to the point where they become a liability.

This is exactly what Go does. Languages like C++ or Rust make it possible to expose and interact with those complex requirements, whereas Go takes it away in the name of “simplification”. Just look at all of the insane hacking tailscale does on Go to make it work for them.

Re:Mixing Swift and C++ by jstimpfle on Monday July 24, 2023 @07:04PM (#36855468)
Any example? I honestly don't know tailscale nor have I programmed seriously in Go.

I can understand that sometimes you want tools to quickly cut through obstacles, however I've also noticed that applying such tools without extreme care, like on a regular basis, seems to always lead into local maxima and at some point these choices have to be reconsidered.

One explanation for this phenomenon that I've found is that language features are typically accessed using special syntax, because otherwise they could be library features. Well, it's hard or typically even impossible to abstract over syntactic uses of such features. For example, it's hard to automate the definition of a class based on more abstract concepts, when such creation has to be done as explicit syntax instead of using a builder-style API that iteratively adds members and methods.

Re:Mixing Swift and C++ by nmfisher on Sunday July 23, 2023 @10:28PM (#36842438)
Echoing these sentiments - I find Swift very painful to use.