Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Once again, Did you even read the article?
Stackoverflow is Apple fanboys now? Facepalm.

It's official you are delusional and just like to talk nonsense.

certainly read it... i'm not the delusional one but it is comforting to know you are the authority on all things programming and delusion. next time i need to know what is going on i will ask you.
 
certainly read it... i'm not the delusional one but it is comforting to know you are the authority on all things programming and delusion. next time i need to know what is going on i will ask you.

No next time you should maybe say something substantial or try to backup your claims instead of just talking nonsense. It's embarrassing
 
I did. The only reason people are supporting this is because it supports apple which is winning the game lol. Don't you see it or are you really that blind? None of this is an endorsement of it as a 'better' language.
[doublepost=1465051819][/doublepost]

Right, popular doesn't imply better, just more popular and i think in general if you follow the money you find the real reason. Don't let the door slam on your way out lol.

Do you have any specific criticisms of the language?

Actually, Swift is intrinsically quite a compelling language:

- Extremely type-safe; not even any implicit conversions between numeric types
- Optionals, avoiding the need for sentinel values
- Good error model, interesting features such as 'guard' and 'defer'
- Compile-time generics without type erasure
- Zero-cost abstractions, rich, extendable value types
- Theoretically able to generate better code due to more complete compiler understanding
- Obviously, official support from at least one major platform. Linux port available
- Not yet finalised or standardised; lots of stuff still to add/change and you can be a part of it!

That's why so many companies are interested in this - IBM, Facebook, Google, etc. I think they want Swift to take on Java, Python, Node.js and maybe Ruby rather than C. It's not just Apple who sees a need for it - Google has been trying on their own with Go and Dart.

The gains from faster, more efficient code multiply themselves by 1,000,000 when you're deploying on a server farm of Google or IBM's scale.
[doublepost=1465132337][/doublepost]
They want this because it opens them up to a huge developer base is why. The semantics of the language have nothing to do with the decision.

They don't care about that. See how long they kept with Objective-C. And then, even when they 'replaced' it, it wasn't with an existing language but another new one. Apple aren't afraid to go it alone; the developers will come.

Apple is not paying anybody to support Swift. Apple does not own Swift anymore. Swift is distributed under an Apache 2.0 License with RLE.
 
  • Like
Reactions: Mascots
Just thought I'd mention that some of the AAA titles coming out in 2016, still have their Engine written in C such as the Frostbite 4 engine.

Sure - you can do anything with C - even write secure code - and if you're proficient in C the familiarity may outweigh the advantages of newer languages. The question is, going forward, whether you need to write in C to get the necessary performance.
[doublepost=1465137007][/doublepost]
That's why so many companies are interested in this - IBM, Facebook, Google, etc. I think they want Swift to take on Java, Python, Node.js and maybe Ruby rather than C.

My only reservation about Swift is its suitability as a beginner's language - the type system is good, but takes some learning (especially optionals) and because the standard library is, basically, a chunk of the OS X/iOS/NextStep API you're kinda thrown straight in the deep end.

On the other hand, that could be to its advantage as a serious language, because it has evolved with a practical purpose in mind (OS X/iOS App development) rather than as an academic idea of the perfect language. The previous examples of that were C - written to implement Unix, and with a chunk of the Unix API as its standard library; and Java - always joined at the hip with a crossplatform WIMP application framework, vs. Pascal et. al.
 
No next time you should maybe say something substantial or try to backup your claims instead of just talking nonsense. It's embarrassing

you are the only person embarrassed here... sorry for your insecurity
[doublepost=1465151262][/doublepost]
Do you have any specific criticisms of the language?

Actually, Swift is intrinsically quite a compelling language:

- Extremely type-safe; not even any implicit conversions between numeric types
- Optionals, avoiding the need for sentinel values
- Good error model, interesting features such as 'guard' and 'defer'
- Compile-time generics without type erasure
- Zero-cost abstractions, rich, extendable value types
- Theoretically able to generate better code due to more complete compiler understanding
- Obviously, official support from at least one major platform. Linux port available
- Not yet finalised or standardised; lots of stuff still to add/change and you can be a part of it!

That's why so many companies are interested in this - IBM, Facebook, Google, etc. I think they want Swift to take on Java, Python, Node.js and maybe Ruby rather than C. It's not just Apple who sees a need for it - Google has been trying on their own with Go and Dart.

The gains from faster, more efficient code multiply themselves by 1,000,000 when you're deploying on a server farm of Google or IBM's scale.
[doublepost=1465132337][/doublepost]

They don't care about that. See how long they kept with Objective-C. And then, even when they 'replaced' it, it wasn't with an existing language but another new one. Apple aren't afraid to go it alone; the developers will come.

Apple is not paying anybody to support Swift. Apple does not own Swift anymore. Swift is distributed under an Apache 2.0 License with RLE.

Intrinsically compelling sounds like high speeder comp sci. talk. None of those things makes for an easy language to learn by the way which was the original point besides being somehow 'swifter' which I don't see the argument there. C++ compiler has a rather complete understanding as well translating almost directly into optimized assembly or at least no worse for the wear. Is there proof somewhere showing the operational efficiency of compiled Swift vs C++? You say it is theoretical, let's see it.
 
My only reservation about Swift is its suitability as a beginner's language - the type system is good, but takes some learning (especially optionals) and because the standard library is, basically, a chunk of the OS X/iOS/NextStep API you're kinda thrown straight in the deep end.

On the other hand, that could be to its advantage as a serious language, because it has evolved with a practical purpose in mind (OS X/iOS App development) rather than as an academic idea of the perfect language. The previous examples of that were C - written to implement Unix, and with a chunk of the Unix API as its standard library; and Java - always joined at the hip with a crossplatform WIMP application framework, vs. Pascal et. al.

The standard library has nothing to do with OSX/NextStep. I think you're confusing the standard library with Foundation. The Swift standard library is surprisingly bare: it's stuff like CollectionType, SequenceType, Int and String. Foundation is something else: it's a cross-platform library to abstract things like filesystem paths and locale-aware value formatting. You don't need to use it, but the big thing about it being cross-platform is that iOS/OSX code which relies on it will suddenly work on Linux (as long as it doesn't need Obj-C interop). Maybe the Linux people won't like it and will prefer to use some other library; that's fine.

Intrinsically compelling sounds like high speeder comp sci. talk. None of those things makes for an easy language to learn by the way which was the original point besides being somehow 'swifter' which I don't see the argument there. C++ compiler has a rather complete understanding as well translating almost directly into optimized assembly or at least no worse for the wear. Is there proof somewhere showing the operational efficiency of compiled Swift vs C++? You say it is theoretical, let's see it.

"Intrinsically compelling" is just English. It means that Swift has features which make it attractive by itself, not just because of who supports it.

As I think you said yourself somewhere else; practical experience suggests that it's impossible for human beings to write really good, secure C++ code. C++ doesn't have the extendable value types that Swift has, which allow for these very cool zero-cost abstractions. Swift has so many great features that justify its existence as a separate language: optionals, type inference, associated values on enums, extensions, Swift's unique generics system, their error model, the 'guard' and 'defer' statements, etc, etc. All of these things are really great improvements, they're much easier to learn and (most importantly) to get right in Swift than C++.

Look, if you're so in love with C++, keep using it. I'm sure it's not going anywhere; there are still people using FORTRAN. The rest of us are quite excited about all of the great things in Swift; you don't seem to know many details and talk in general terms, so maybe you should actually check it out? Check out the 'defer' statement, for example, and think of how much you'd love that in C++. Then petition standards bodies and maybe your grandkids will be able to use it.
 
you are the only person embarrassed here... sorry for your insecurity
[doublepost=1465151262][/doublepost]

Intrinsically compelling sounds like high speeder comp sci. talk. None of those things makes for an easy language to learn by the way which was the original point besides being somehow 'swifter' which I don't see the argument there. C++ compiler has a rather complete understanding as well translating almost directly into optimized assembly or at least no worse for the wear. Is there proof somewhere showing the operational efficiency of compiled Swift vs C++? You say it is theoretical, let's see it.

I see, still no facts. You are hopeless.
 
The standard library has nothing to do with OSX/NextStep. I think you're confusing the standard library with Foundation

Quite possibly. However, as I understand it, interoperability between standard library types and the foundation
It might just be that a lot of the documentation/tutorials in Swift are pitched at existing iOS developers.

Anyway, I decided to let it lie until Swift 3 is properly released (looks like that's going to make some of the library types and method less verbose too) - hopefully they'll keep their promise and not keep changing the language every six months.
 
Quite possibly. However, as I understand it, interoperability between standard library types and the foundation
It might just be that a lot of the documentation/tutorials in Swift are pitched at existing iOS developers.

Anyway, I decided to let it lie until Swift 3 is properly released (looks like that's going to make some of the library types and method less verbose too) - hopefully they'll keep their promise and not keep changing the language every six months.

It's one of the biggest complaints so far (syntax changes). However I think it's for the better, they getting rid of a lot of the old ObjC mess and cleaning and improving the syntax in general. New features such as defer, guard and protocol extensions are just too awesome and are all for the better.
The Xcode migratory tool also works very well IMO and I never had to spend more than an hour to get Xcode to recompile again, even after Swift2 was released.

Starting with swift 3 the say swift will stabilise a lot more and changes should be less drastic.
 
The standard library has nothing to do with OSX/NextStep. I think you're confusing the standard library with Foundation. The Swift standard library is surprisingly bare: it's stuff like CollectionType, SequenceType, Int and String. Foundation is something else: it's a cross-platform library to abstract things like filesystem paths and locale-aware value formatting. You don't need to use it, but the big thing about it being cross-platform is that iOS/OSX code which relies on it will suddenly work on Linux (as long as it doesn't need Obj-C interop). Maybe the Linux people won't like it and will prefer to use some other library; that's fine.



"Intrinsically compelling" is just English. It means that Swift has features which make it attractive by itself, not just because of who supports it.

As I think you said yourself somewhere else; practical experience suggests that it's impossible for human beings to write really good, secure C++ code. C++ doesn't have the extendable value types that Swift has, which allow for these very cool zero-cost abstractions. Swift has so many great features that justify its existence as a separate language: optionals, type inference, associated values on enums, extensions, Swift's unique generics system, their error model, the 'guard' and 'defer' statements, etc, etc. All of these things are really great improvements, they're much easier to learn and (most importantly) to get right in Swift than C++.

Look, if you're so in love with C++, keep using it. I'm sure it's not going anywhere; there are still people using FORTRAN. The rest of us are quite excited about all of the great things in Swift; you don't seem to know many details and talk in general terms, so maybe you should actually check it out? Check out the 'defer' statement, for example, and think of how much you'd love that in C++. Then petition standards bodies and maybe your grandkids will be able to use it.

I'm not in love with anything just trying to understand what makes sift so swift, say swifter then a well optimized language such as C++, used only as an example. My point was most of the features you mentioned are not at all easy for a beginner to understand. My argument is swift is not 'intrinsically' easier to learn nor faster running nor syntactically clearer then many other languages.
[doublepost=1465261049][/doublepost]
I see, still no facts. You are hopeless.

likewise
 
C is not a perfect language. Those 'for' loops you mentioned are total garbage, some kind of hieroglyphics that isn't immediately obvious. Swift's loop syntax is much easier to understand IMO, and it can support filters to make it even easier to read ("for case let ... where ..." -- the 'if case let' syntax is a bit iffy, I'll grant that, but Swift is open and you're welcome to suggest improvements).

Other things, like unary operators, you yourself agree that they're bad while also criticising Swift for not wanting to keep this C cruft around?

I think your expectations of Swift are wrong. They want it to be as universal as C, they want it to be as fast if not faster than C, but Swift is not C. They will not copy C's syntax, and if there are decades-old C conventions which today are considered unsafe/poor practice, they will not apologise for not implementing them.

When creating a new language, you want it to be reasonably familiar so people have an easier time learning it, but it's a very minor consideration. Having a clear and consistent identity for the language is more important, and if you get those right your language will be intuitive without needing to cobble it together from bits of other languages' corpses.

Things like the for syntax are good examples. Swift is just plain better than C here, IMO:

Swift:
for index in 0...5 {
// index will be 0,1,2,3,4,5
}​

C:
for(int index=0; index<=5; index++) {
// huh?
}​

Swift:
for index in 0...10 where index % 2 == 0 {
// index will be 0,2,4,6,8,10
}​

C:
for(int index=startIndex; index<=10; index++) {
if( index % 2 != 0 ) {
continue;
}
// Yuck.
}​


Except there's no agreement that such C conventions are bad practice, and certainly aren't unsafe. The swift way of doing things is arguably more complex for someone coming from a C-style background. Let's take your examples

1) What's happening in the C code is pretty easy to figure out. I'm not sure why you say 'huh?'.
2) Swift: Does this let you iterate over an array? B/c this is not the recommended way of doing things - in Swift you're supposed to iterate the object over the array, not the index, which leads to confusion as to how to edit an object at a particular index for someone coming from a C background. Moreover, it's not intuitive as to how to chain together multiple conditions in the Swift code, either using OR or using multiple if statements if necessary. The Swift way of doing things is fine if you just need to access a particular location, not edit it. I personally prefer the second way tbh. Now, as the person who recommended getting rid of the C-style for loop mentioned, as people's experience with the language increases, their reliance on C-style code decreases, but as it stands it is a barrier to entry for devs new to Swift coming from a C-style background.
[doublepost=1465263588][/doublepost]
Fair enough, most developers would disagree with you. So would IBM that uses swift and google who are considering to use swift as a first class language.

What better and clearer languages are there

Java? Nope;
Python? Nope
ObjC? Hell no

Swift is the simplest and cleanest by far, getting rid of as much baggage and legacy syntax along the way. I like it a lot.
First off, IBM is figuring out how to use Swift - it does not use Swift in production mode yet. Google's looking into Swift is a rumor, although not an unlikely one. Second, I find Java to be clearer (although that's subjective). As for better, that's really up to preference.
[doublepost=1465264250][/doublepost]
yeah, gotta hate those high speeders out there always using the eclectic features that just make for confusion and don't really improve anything but sound good on paper. I think there is a bit too much of that sort in comp sci. these days.
[doublepost=1464877944][/doublepost]

Obj-C is a nightmare language too for it's cryptic syntax and calling conventions. Regarding Perl also a complete syntactic mess. Python at least tries to simplify the syntax and I applaud that. If I was to learn a first language of them all as a new programmer I would guess either c or python would be the easiest to learn and also the most powerful 'swift' as it might be. The biggest issue in general with programming isn't the language but the ease and availability of libraries or api's for actually doing something bigger then sorting a vector.
[doublepost=1464878008][/doublepost]

Not joking at all and just don't see that as true.
The biggest issue once adoption has begun is libraries, sure, but to get developers interested in Swift, ease of use is far more important imo b/c new languages can be forgiven for not having a broad set of libraries. Admittedly, as I think I admitted earlier, you're right about perl so I rescind that part of my statement.
 
Last edited:
I'm not in love with anything just trying to understand what makes sift so swift, say swifter then a well optimized language such as C++, used only as an example. My point was most of the features you mentioned are not at all easy for a beginner to understand. My argument is swift is not 'intrinsically' easier to learn nor faster running nor syntactically clearer then many other languages.
[doublepost=1465261049][/doublepost]

likewise

Yeah all the links I posted were imaginary. You don't event try to proof you point are you?
[doublepost=1465301007][/doublepost]
Except there's no agreement that such C conventions are bad practice, and certainly aren't unsafe. The swift way of doing things is arguably more complex for someone coming from a C-style background. Let's take your examples

1) What's happening in the C code is pretty easy to figure out. I'm not sure why you say 'huh?'.
2) Swift: Does this let you iterate over an array? B/c this is not the recommended way of doing things - in Swift you're supposed to iterate the object over the array, not the index, which leads to confusion as to how to edit an object at a particular index for someone coming from a C background. Moreover, it's not intuitive as to how to chain together multiple conditions in the Swift code, either using OR or using multiple if statements if necessary. The Swift way of doing things is fine if you just need to access a particular location, not edit it. I personally prefer the second way tbh. Now, as the person who recommended getting rid of the C-style for loop mentioned, as people's experience with the language increases, their reliance on C-style code decreases, but as it stands it is a barrier to entry for devs new to Swift coming from a C-style background.
[doublepost=1465263588][/doublepost]
First off, IBM is figuring out how to use Swift - it does not use Swift in production mode yet. Google's looking into Swift is a rumor, although not an unlikely one. Second, I find Java to be clearer (although that's subjective). As for better, that's really up to preference.
[doublepost=1465264250][/doublepost]
The biggest issue once adoption has begun is libraries, sure, but to get developers interested in Swift, ease of use is far more important imo b/c new languages can be forgiven for not having a broad set of libraries. Admittedly, as I think I admitted earlier, you're right about perl so I rescind that part of my statement.

Nope, IBM is not learning swift, it us using swift for server stuff. Also all their enterprise apps will/are written in swift (over 100).

Direct quote from IBM

"Each one of the over 100 apps that we have delivered is built 100% natively using the Swift language"

"IBM has become the largest user of Swift as a programming language for building enterprise apps. We have found the language to be extremely powerful, useful and code-safe"

Is anybody actually reading links posted by people on this forum? Apparently not
 
Last edited:
Yeah all the links I posted were imaginary. You don't event try to proof you point are you?

You just keep going in circles... none of what you posted indicates Swift as an easier language to learn or a more efficient 'swift' language which was my original proposition. Not even sure what you are trying to prove for yourself here and don't think you know either.
 
You just keep going in circles... none of what you posted indicates Swift as an easier language to learn or a more efficient 'swift' language which was my original proposition. Not even sure what you are trying to prove for yourself here and don't think you know either.

The survey from Stackoverflow now enough? You know the one you insisted was a biased indicating you didn't even read it?

Where are you proofs? You have shown nothing, zilch, zero, nada.
Anything?

At least let me know which language you think is easier. Give me something
 
The survey from Stackoverflow now enough? You know the one you insisted was a biased indicating you didn't even read it?

Where are you proofs? You have shown nothing, zilch, zero, nada.
Anything?

At least let me know which language you think is easier. Give me something

no one even cares... get over it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.