The Swift Programming Language
551–560 of 970 posts
Re: The Swift Programming Language
#552Earlier quoted context omitted.
I never understood what the fuss was all about either. If you know one other language really well, Objective-C should take a week or two to get use to. To understand all the design patters, apple HIG, XCode, profiling, libraries, debugging, app submission, etc, these combined is where youll sink your time to learn iOS development. Imo, Objective-C is the easy part.
I recently translated one of my Apps from Android to iPhone. I had 0 objective-C experience, but I made it work. It was a bit of a frustrating experience. Many times I found myself writing Objective-C boilerplate-ish code that I had 0 clue what it was doing, considering this is a hobby / for fun project I just wanted it working. It's not easy to google the answer to, "Why did I just add this new keyword after this co…
Re: The Swift Programming Language
#553Earlier quoted context omitted.
Correct me if i'm wrong, but Swift has static typing (with type inference, but still with a strict type on every variable), whereas Objective C has dynamic typing with optional type annotations. Having ubiquitous strong type information available should make it much easier to generate fast code.
Hm, maybe that's it. I thought typing was still dynamic because of the multiple return types.
Re: The Swift Programming Language
#554Earlier quoted context omitted.
Heartbleed. Majority of all SSL keys on the internet compromised. All ~2 billion of humans on the internet required to change their passwords due to a single mistake by a single programmer using C. That's billions of human beings wasting hours either changing all their passwords or having their money, identities, medical records, and more stolen because they didn't. Having their accounts hijacked. For all we know tot…
It is unethical to continue writing code in non-memory-safe C or C-based languages, for any purpose. Period. I'm looking forward to seeing your new operating system and managed runtime written entirely using garbage-collected languages!
Re: The Swift Programming Language
#555Nothing about concurrency. Nice. STOP MAKING NEW LANGUAGES!!! This is like environment pollution and should be shunned.
> Swift is the result of the latest research on programming languages
What research? The Apple marketing went a little overboard here.
I know Objective-C is subjectively bad from trying to use it. Swift is a step up and that's the exciting part. That's a good thing for ios development.
Re: The Swift Programming Language
#556Earlier quoted context omitted.
I really don't see the Golang influence at all. The multiple- return- value semantic is closer to Ruby's than to Golang's; you're returning a tuple, which happens to have natural syntax in the language. Defining Golang features that don't exist in Swift: - Interface types with implicit adoption (Swift takes explicit protocols from ObjC) - Error types - Relatedly, the "damnable use requirement" and its interaction wit…
> - Interface types with implicit adoption (Swift takes explicit protocols from ObjC) Objective-C has informal protocols, and so does Swift.
Re: The Swift Programming Language
#557Re: The Swift Programming Language
#558One question to the audience : i've had a look at the swift iBook and noticed that dictionary are strongly typed. Which is great in a way, but now i wonder : how would you create a json deserializer ( which conveniently deserialized into NSArray and NSDictionnary of anything ) ? I didn't see any "object" or "id" type equivalent.
Re: The Swift Programming Language
#559Earlier quoted context omitted.
"93x faster" sounds roughly like a 46.5x improvement in marketing.
It's not only possible, it's even not uncommon for a C programmer to get a 90X improvement in speed in their own C program. If you have naive memory management, or incorrectly implemented concurrency or parallelism, you can easily lose 2 orders of magnitude speed.
300x improvement instantly by moving it out of the loop.
Re: The Swift Programming Language
#560Earlier quoted context omitted.
I don't get the hate. Yeah, syntax is unfamiliar, bu once I got used to it I began to really enjoy objective-c. Ymmv etc., but it's now one of my fav languages - though I guess this is mostly due to cocoa
My dislike is that it uses [] for method calls. It's like making Objective-English where we swap Z and A and j for o, just for the hell of it. If thzt sjunds like fun tj yju, thzn gj fjr Jboective-C.
[ ] does not mean method call, it is the syntax for a message send.
Objective-C is a super set of C, adding an Smalltalk like object system to C. The delimiters say "I am sending a message", which is different to a method call. Also, without them the language would be much more difficult to parse, and future changes to C could break the language. It's lasted well (first appeared in 1993). Not as long as Lisp, perhaps it needs more [ ] :)