Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Even Longer

macrumors 6502
Dec 12, 2012
482
435
Heidelberg
Hmm...

The Swift-Icon actually symbolizes an Euro currency symbol in a free fall. ;)

It's a hidden message and definitely a conspiracy! :)
Anyone who sees something different, e.g. swallow, is definitely blind on the third eye!
 

iMacFarlane

macrumors 65816
Apr 5, 2012
1,123
30
Adrift in a sea of possibilities
Learn Objective-C anyway. It's a good language and it'll teach you all sorts of things about computer logic and so on. Great books on Swift won't come out for months, anyway, and the more languages you know the easier it is to pick up new ones.

It seems like a never ending cycle. iOS (x) comes out, and it takes so long for the books to start rolling out, that iOS (x+1) is just a few months away. Also, it seems like every revision of xCode dramatically changes the locations and groupings of the functional parts of the IDE. Pretty frustrating, but it keeps you in the documentation, I guess.

----------

Great, all this happens a few weeks after I purchase the big nerd ranch book about objective C development. Oh well. :D

Same here. :eek:
 

mrxak

macrumors 68000
Well I gave Xcode 6 beta a try. Had some difficulties. It seems not all of Swift is actually even implemented yet. There's stuff the book says you can do that Xcode will say isn't possible yet. I also encountered a number of bugs with Xcode 6.

So, I'd really suggest anybody looking to get into Swift, wait a while. Most indications say this will be a fantastic language eventually, but until we get another version or so of Xcode, it's not really possible to start development in any serious way. So, read the book, watch the WWDC session videos, and start thinking about code, but don't bother trying to do anything with it yet. Hopefully in a few weeks or a month we'll see a more thorough release.
 

Lord Hamsa

macrumors 6502a
Jul 16, 2013
698
675
If you've never programmed a scripting language like Ruby or Python is a good starting point.

Personally, I've always recommended that newer developers start off with strongly-typed object/class-based languages like Java, C++ (later C#), and now, Swift. It's a lot easier to learn scripting languages (and to use them well) if you have a solid foundation in higher-level programming than to work the other way around.

Man, if I ever had the time to devote to this... I've long had a vision of writing a textbook for computer programming that was language-agnostic, focusing on the concepts behind programming, the types of constructs used, and how they fit together. Then there'd be a companion series where each companion book is tailored to a specific language; you would read the companion book in parallel with the main book to see how the material in Chapter X is actually implemented in language Y, with additional material at the end (or other logical place) in the companion to deal with language-specific issues that don't apply to other languages.

Kind of an inheritance-based approached to learning programming languages.
 

Gudi

Suspended
May 3, 2013
4,590
3,264
Berlin, Berlin
I'd like to know if Swift is a good first computer language, or if it's too early to say.
It is a great first language, because it is very modern and very mathematical. More like functional programming less like procedural programming. And therefore easier to understand. I also advice against learning another language first. Knowing another language in advance might help you to understand Swift. But learning another language just now, only helps you to appreciate how much better Swift is.

Everyone here is happy to adopt Swift and leave ObjC behind. Do not go the other way! :eek:
I'm going to go against the flow, I think Swift seems utterly pointless. Another new language only used on Apple is another barrier for people getting involved with Mac development.
You should have stayed silent. Mac development without using Apples own languages and frameworks is utterly pointless. You're not on a platform until you use said platform. Yeah, one could do Java development on a Mac, but than you are a Java developer not a Mac developer.

You have to learn either Objective-C or Swift. Anything else is just Windows. :p
 

Blackforge

macrumors 6502
Mar 8, 2008
290
19
Ehhhh. I just started reading the eBook and right from the start Apple is using terminology and concepts that are not explained at all, and a complete newbie to programming would have no understanding of. Even somebody with no prior knowledge of Objective-C specifically might need outside reference.

While it's probably possible to learn Swift as a first language, I would not recommend Apple's documentation to learn it with. Anyone looking to start learning their first language today would be well advised to start on something else instead, and learning Swift in six months or so when books are published by educators, not tech manual writers.

The "tour" comes before the "Basics" section, so it is a bit confusing. They definitely could have arranged it differently. May want to skip ahead to the "Language Guide" and then go back to the tour if you're really interested.
 

millerlite

macrumors regular
Oct 16, 2007
157
189
"One more thing"?!?

I've followed Apple very closely for about 8-9 years. In that time, not one keynote address has had a "one more thing" moment. Can we retire this meme now?!?
 

zipa

macrumors 65816
Feb 19, 2010
1,442
1
It is a great first language, because it is very modern and very mathematical.

Except that there is no material available to learn it as a first language at the moment. So either you sit around waiting for someone to release a beginners guide, or you do something useful and learn to program using some other language.

My recommendation still stands, "Head First Programming", and throw in "Code Complete" or something like that to go along with it. Learn how to program first, start worrying about different syntaxes second. Or third.
 

charlieegan3

macrumors 68020
Feb 16, 2012
2,394
17
U.K
Personally, I've always recommended that newer developers start off with strongly-typed object/class-based languages like Java, C++ (later C#), and now, Swift. It's a lot easier to learn scripting languages (and to use them well) if you have a solid foundation in higher-level programming than to work the other way around.


On the other hand if you want to get someone to love programming...

I say get them hooked first.
 

mrxak

macrumors 68000
Except that there is no material available to learn it as a first language at the moment. So either you sit around waiting for someone to release a beginners guide, or you do something useful and learn to program using some other language.

My recommendation still stands, "Head First Programming", and throw in "Code Complete" or something like that to go along with it. Learn how to program first, start worrying about different syntaxes second. Or third.

Yeah, plus the compiler is buggy and not yet fully implemented. You also need a developer account to even try it, and Apple isn't yet promising that they won't change the syntax of anything as they get feedback.
 

nutjob

macrumors 65816
Feb 7, 2010
1,030
508
This changes everything. Again.

Predicting Mac OS XI and iOS X to be built from the ground up using Swift.

Yes changes it to be the same as everything else, but different enough to make it incompatible and enable lock-in.
 

hchung

macrumors 6502a
Oct 2, 2008
689
1
It is a great first language, because it is very modern and very mathematical. More like functional programming less like procedural programming. And therefore easier to understand. I also advice against learning another language first. Knowing another language in advance might help you to understand Swift. But learning another language just now, only helps you to appreciate how much better Swift is.

Everyone here is happy to adopt Swift and leave ObjC behind. Do not go the other way! :eek:]

I'd have to disagree with the functional being easier to understand than procedural. Maybe for a beginner programmer, perhaps that's true. But I happen to favor being able to easily grasp the actual dataflow that occurs in hardware from looking at C and related languages, as opposed to something like Haskell/Erlang where there's just enough abstraction for a low-level programmer to say "what's it actually doing? hell if I know."

But hey, maybe I'm too old-school. I don't like ARC in Obj-C either because it encourages inexperienced programmers to write bad code without a proper pain/learning feedback loop. We don't need another Java.
 

Gudi

Suspended
May 3, 2013
4,590
3,264
Berlin, Berlin
But I happen to favor being able to easily grasp the actual dataflow that occurs in hardware from looking at C and related languages.
Don't be your own LLVM Compiler. You gonna be bad at it. There is no hardware. The actual dataflow exists purely within my own type definitions and function calls. Don't dare to show me anything else.
But hey, maybe I'm too old-school. I don't like ARC in Obj-C either because it encourages inexperienced programmers to write bad code without a proper pain/learning feedback loop.
There is nothing to learn, just tons of unnecessary work to do. Totally unrelated to the math of my problem at hand. You can call me new-school. I don't care how the data is stored. I've told you enough to inference the type. Now shut up and deal with it.
 

hchung

macrumors 6502a
Oct 2, 2008
689
1
Don't be your own LLVM Compiler. You gonna be bad at it. There is no hardware. The actual dataflow exists purely within my own type definitions and function calls. Don't dare to show me anything else.

There is nothing to learn, just tons of unnecessary work to do. Totally unrelated to the math of my problem at hand. You can call me new-school. I don't care how the data is stored. I've told you enough to inference the type. Now shut up and deal with it.

You sound like you're in academia: either teaching theory or being taught theory. Hopefully you stay there a while longer.

It's people like you who waste my time at work having to debug memory leaks in poorly written server code because object ownership is memory management, and "Java (and ARC) takes care of memory management for us."

Or are you that guy who declared string constants as UTF-16, but converts them to UTF-8 on the fly every time they need to feed it to a library that only takes UTF-8… where "every time" includes every individual iteration inside for-loops? … because "it's just O(Cn), I can drop the C because the constant doesn't matter?"
 

joeycee

macrumors newbie
Jun 13, 2014
13
13
Boston MA
Here's how I'm teaching myself: I'm using the Big Nerd Ranch Obj-C book and just translating it all into Swift as I go. So far, so good! There are plenty of examples to use, and the console gives you immediate feedback. (Plus you're getting a bit of an exposure to Obj-C whether or not you want to.)

It may sound counterintuitive, but it works for me. There's no need to rush on learning this stuff since it'll be a while before any books are out about it. I've dabbled in programming before but never took a liking to Obj-C because I just hit a wall when it came to things like pointers because it just seemed like unnecessary bookkeeping for a modern language.

I know you pros are laughing at my lack of dedication, but I think I'm pretty typical for an average person with a better-than-average interest in Mac/iOS programming. I don't have any fantasies about making The Next Great App; just a few for myself and maybe some of my friends.

Anyway I plan to continue doing it this way, taking notes along the way (they help more than you think). We'll see how things go, especially once I get into actual interface elements once the Obj-C basics are done.
 

jlabute

macrumors regular
Jan 26, 2014
143
12
Image 16 switches, 1 switch per bit

Today's programmers have it easy.

We programmers from the 80s used to have to build linked lists from dirt and bits of string we found on the ground.

The programmers from the 70s had to punch their code out on cards and feed the cards into the machine.

Inferred variable types...pshaw.

I'd prefer punch cards to the PDP-11 bootstrap entry method. Encode instructions on 16 switches then press a button to increment the program counter. At least it was 16 bits for its day :)

http://en.wikipedia.org/wiki/PDP-11#mediaviewer/File:Digital_PDP11-IMG_1498_cropped.jpg
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.