Questions about Xcode

Joined
Sep 12, 2014
Messages
207
Reaction score
5
Points
18
I just found out from a separate post that I made on this forum that AppleScript can run on Xcode.

Xcode is the IDE not a programming language, right?

Just how many programming languages will run on Xcode?

I know that Objective-C will & Swift will. I just found out that AppleScript will run on Xcode. I suppose that C++ & C will also run on Xcode. Will Java & Javascript & Ruby & Python run on Xcode?

I've browsed thru websites that compare Swift syntax to Objective-C syntax. I'd definitely rather learn Swift. I don't want to have to fool with pointers & allocating & deallocating memory. But, if I want to include Objective-C code or C++ or C code into Swift, how do I do it?
 
Last edited:
Joined
Aug 13, 2011
Messages
200
Reaction score
7
Points
18
Location
West Sussex
Correct Xcode is an IDE and not a programming language.

You can code Swift and Objective-C with Xcode, and yes you can code Applescript and ApplescriptObjC with Xcode as well.
You may be wondering what ApplescriptObjC is, it is a new language that Apple introduced in Mountain Lion that has developed over the last couple of years, and it is a combination of Applescript and Objective-C syntax, that enables you to use the Cocoa Frameworks on OS X, to build full blown Apps with a UI in the Applescript language.

And yes you can also compile and use both C and C++ in Xcode, but no you can't use Java in Xcode at present, but my understanding is that Apple plan to introduce the Java Script language in the future.

I'm guessing your new to programming, so before deciding on what language to learn, decide what type of programmes you want to make.
If you want to create iOS Apps, then Objective-C and Swift are the only truely native languages for iOS, so learn them in that order.
If you want to create OS X Apps, then both of the above are also the correct choices, or if you want to keep it simple, then Applescript and ApplescriptObjC are a good starting point, and ideal for learning the cocepts of programming.

If you want to make cross platform Apps. i.e. Windows Linux and OS X then Java or C++ are the professionals choice, and you'll also need Java for Android.
So in short, decide what you want to achieve, and on what platforms, before deciding on your learning curve.

Regards Mark
 
Joined
Aug 13, 2011
Messages
200
Reaction score
7
Points
18
Location
West Sussex
Just one more thing you should understand, and that is you still work with pointers in the Swift language.
But do not work with pointers in AppleScript or AppleScriptObjC.

Mark
 
OP
D
Joined
Sep 12, 2014
Messages
207
Reaction score
5
Points
18
Just one more thing you should understand, and that is you still work with pointers in the Swift language.
But do not work with pointers in AppleScript or AppleScriptObjC.

Mark

Does one have to allocate & deallocate memory as well in Swift? I was hoping to avoid pointers.

You didn't mention Ruby & Python. I suppose that they are not compatible with Xcode.

I'm guessing your new to programming, so before deciding on what language to learn, decide what type of programmes you want to make.
I've played around with Java & classic Visual Basic & Visual Basic.net. I understand the rudiments of object-oriented programming. I want something that's not cryptic & avoids pointers & manual memory management. That's why I was intrigued when I read about Swift. I want something closer to Java than Objective-C or C++ or C.
 
Joined
Aug 13, 2011
Messages
200
Reaction score
7
Points
18
Location
West Sussex
Sorry I'm slow getting back to you, have been away for a couple of days.

Not sure about Ruby or Python in Xcode, but Xcode has been primarily designed by Apple to use Apple's own languages, and also traditional C and C++.

Yes you allocate memory in Swift in a similar way to Objective-C, but memory management is done with the ARC mechanism introduced in Xcode 5, so no manual deallocating is required or allowed. except for ANSI C code.

If your looking for something like Java, then why not code in Java?
the most popular IDE's are Netbeans and Eclipse, so Google them for more info.

I also came from Basic and Visual Basic, and the nearest thing to that in an Object Orientated language is Xojo, that used to be called Real Basic, very similar to VB6 in it's syntax.

Xojo

Regards Mark
 
OP
D
Joined
Sep 12, 2014
Messages
207
Reaction score
5
Points
18
If your looking for something like Java, then why not code in Java?
the most popular IDE's are Netbeans and Eclipse, so Google them for more info.


I have Netbeans installed on my mini & on my laptop. I have one of those "Learn Java in 24 hours" books. I'm intrigued by the graphics capability of JavaFX. I want to learn that as well.

Swift, itself, doesn't deal with pointers, right? But since Objective-C & C++ & C DO deal with pointers & they can be incorporated into Swift, Swift has to deal with pointers. I read on the 'net about a bridging header that has to be used to incorporate Objective-C & C++ & C code into Swift.

On websites I've compared Swift syntax to Objective-C syntax. Swift syntax is less cryptic than Objective-C syntax. That's why I was initially intrigued by Swift. But after reading about bridging headers & other stuff, I decided that Swift isn't for me. Swift limits me to Apple. I'd rather learn Java & JavaFX because they are universal.

I also came from Basic and Visual Basic, and the nearest thing to that in an Object Oriented language is Xojo, that used to be called Real Basic, very similar to VB6 in it's syntax.

I tried it when it was called RealBasic. I don't know if I want to spend $300. Besides, there are no hardcover books on Xojo.
 
Joined
Aug 13, 2011
Messages
200
Reaction score
7
Points
18
Location
West Sussex
With respect you seem to be having a conversation with yourself about your own question, the two most important things you have to decide are.

What sort of Apps do I want to make?

What platforms do I want to develop for?

If you can answer those two questions first, then that starts to lead you in the direction of the correct language to learn, which in turn leads you in the right direction for an IDE for the chosen language.

As you probably know there are dozens of programming and scripting languages, all of them have their strengths and weaknesses, and in the world of object orientated languages your unlikly to find anything as basic in syntax as Visual Basic, even VB .NET is in no way reminicent of the original VB languages simplicity.

So in conclusion, if you want to target Android then Java is the correct choice.

If you want to target iOS, then Objective-C and Swift are the correct languages, and do bare in mind that Apple have already hinted at the fact that Objective-C based frameworks will be superseded by Swift based frameworks some time in the future.
And Yes the syntax for Swift is a little less verbose than Objective-C, but Objective-C is still the most supported by the Cocoa Frameworks at this point in time, so learning Objective-C is not time wasted.

If you want to make Apps for Windows then VB .NET and C# are obvious choices, along with Java and C++.

If you want to make Apps for OS X then Objective-C Swift and AppleScriptObjC are good choices, along with Java and C++.

If you want to make Apps for all platforms then Java and C++ are good choices.

at this point you should start to see a pattern forming, depending on the platform you want to develop for.

Mark
 
Last edited:

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top