I'd take it up a few more levels and ask about the elephant in the room: in what significant way is this language better than C#?
This outrage over closures reminds me of tabs vs spaces - it's one level above utter lunacy. Who gives a shit what the syntax is? Didn't we use Objective-C not long ago? Programming languages are a tool for me, not an artistic expression of text on a screen.
What has this language allowed me to build that I couldn't in Objective-C? Let's use empirical evidence - why do we have electron apps for something as basic as a chat app (Slack) instead of a native app?
We're going backwards in software tools as far as I can tell. Everything is more complicated and fragmented and Swift is a part of this mess, not a solution.
Sorry, carry on with expressing opinions about syntax and pointing out that those who pay for the juke box, get to select the songs and are hypocrites when they pretend otherwise and press 'Billie Jean' when most people wanted 'Thriller'.
> in what significant way is this language better than C#?
- direct compilation to native code with static analysis and optimization
- automatic reference counting (more predictable/consistent performance vs. garbage collection)
- good support for native iOS and macOS app development
- ranges
(But on an unrelated note, I have to say it's disappointing to me to find any language in 2020 (Java...) that doesn't support named and default parameters.)
I'm confused by your post. You first say the syntax doesn't matter, languages are just a tool, yet you say that Swift is part of the problem because everything is more complicated.
The increasingly complex syntax of Swift IS the problem.
We have furniture and some furniture uses screws to hold it together.
A furniture manufacturer decides to create a new line of furniture and introduces a new type of screw that requires you use a new screwdriver.
This screwdriver and screws are magical, they can magically alter themselves over time in small ways - they can change color, the handle can become rubberized or change texture, etc.
There's a whole group of people working on deciding how the screwdriver and screws magically alter themselves and which rubber material is best, which color is most pleasing, etc. They're so wrapped up in it, they never stop to ask, wait, why the fuck did this new line of furniture even require new screws and screwdrivers? When I compare the old line of furniture and the new, I can't tell the difference! It's the same shitty furniture!
We have multiple furniture manufacturers, why didn't we just agree to use the same screws and screwdrivers for all of them?
I don't get it - the people who are so passionate about screwdriver handles of one single manufacturer, to me, are a bunch of lunatics.
I dunno, but I find real assemble-it-yourself furniture to pretty much fit that description anyway.
I wanted some replacement shelf supports for a bookcase, and it turned out there are ones that are specified in metric dimensions and ones that are not, and they are like half a mm different, and so the only ones that the local big box store carried were just enough off they didn't work. Even with a hammer. And my drill wouldn't fit in the corner. So I ended up taking the appropriate drill bit and enlarging the holes by twisting it in my fingers, which hurt a bit but shockingly worked as it was a truly tiny bit of additional clearance needed and soft particle board.
It really was annoying in a rather similar manner as programming can be. The fasteners and tools to make cheap furniture should be standardized.
Electron is an economic choice, not a choice of engineering excellence. Make desktop apps that work on all major desktop OSes (actual write once, run everywhere) and also works as a web app with one kind of very ubiquitous engineer on one code base. Web apps are also very popular from a customer adoption standpoint.
Also Objective-C scares people away. Swift being a nicer Obj-C syntax alone has consequences of it's own. And pretty much nobody in silicon valley / startups / big tech other than microsoft uses C#. C# is anti-recruiting indicator in most engineer's minds.
I also think nullability typing in swift & all major libraries having proper nullability typing brings major benefits, I'm not sure if C# has that.
This outrage over closures reminds me of tabs vs spaces - it's one level above utter lunacy. Who gives a shit what the syntax is? Didn't we use Objective-C not long ago? Programming languages are a tool for me, not an artistic expression of text on a screen.
What has this language allowed me to build that I couldn't in Objective-C? Let's use empirical evidence - why do we have electron apps for something as basic as a chat app (Slack) instead of a native app?
We're going backwards in software tools as far as I can tell. Everything is more complicated and fragmented and Swift is a part of this mess, not a solution.
Sorry, carry on with expressing opinions about syntax and pointing out that those who pay for the juke box, get to select the songs and are hypocrites when they pretend otherwise and press 'Billie Jean' when most people wanted 'Thriller'.