Jump to content
  • Advertisement
Sign in to follow this  
Navyman

Swift - Love it or Hate it?

This topic is 592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Swift - Apple's new programming language has developed over the years and while there have been some growing pains between updates I have found it a much smoother method of creating apps.

 

There are a few minor pains that I have found to not agree with, but I would like to hear some other options.

Example Issue:

The removal of ++ & -- because they are too C++ like.

Share this post


Link to post
Share on other sites
Advertisement

Don't hate it but dislike it.  Been developing iOS apps since 2008.  All my colleagues are die hard apple fan boys who think anything created by the mothership must be genius but, I've used lots of other languages and can see where Swift has tried to take inspiration.
 

Share this post


Link to post
Share on other sites

It's neat, I like it. I find bridging between C++ to be more cleanly and easily accomplishing with Objective-C(++) still, though, so I don't end up using as much Swift as I'd like on any sort of mixed-language project.

Share this post


Link to post
Share on other sites

It's neat, I like it. I find bridging between C++ to be more cleanly and easily accomplishing with Objective-C(++) still, though, so I don't end up using as much Swift as I'd like on any sort of mixed-language project.

 

Is that possible then? I'd always assumed that choosing Swift meant choosing not to use C++ in any way, so had completely rejected it as an option.

Share this post


Link to post
Share on other sites

Is that possible then? I'd always assumed that choosing Swift meant choosing not to use C++ in any way, so had completely rejected it as an option.

 

The same way you can do it for any other language, thanks to an amazing technology from the 1960s:  The Linker.

 

Programs are built from all kinds of libraries, archives, or modules, depending on how things are named. All the libraries get linked together into the final executable.  It doesn't matter if the libraries were built in Swift, C++, C, Assembly, Fortran, or anything else, but they all follow a basic naming system and parameter-passing system and other rules that form a common interface.  As long as all the code was compiled to match the same interface -- called the application binary interface -- all the parts will work together.

 

Although the interface actually predates C, it is often called a C-style linkage or extern "c" or similar.  

 

Swift calls it a "Bridging Header".  Google finds this little example among many.

Share this post


Link to post
Share on other sites

Would you recommend any books on Swift and graphics?

 

I learned Swift mostly from youtube videos and forum questions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!