Slashdot Mirror


Apple Announces New Programming Language Called Swift

jmcbain (1233044) writes "At WWDC 2014 today, Apple announced Swift, a new programming language. According to a report by Ars Technica: 'Swift seems to get rid of Objective C's reliance on defined pointers; instead, the compiler infers the variable type, just as many scripting languages do. ... The new language will rely on the automatic reference counting that Apple introduced to replace its garbage-collected version of Objective C. It will also be able to leverage the compiler technologies developed in LLVM for current development, such as autovectorization. ... Apple showed off a couple of cases where implementing the same algorithm in Swift provided a speedup of about 1.3X compared to the same code implemented in Objective C.'" Language basics, and a few worthwhile comments on LtU.

9 of 636 comments (clear)

  1. Re:It's about time by Anonymous Coward · · Score: 5, Funny

    I can't wait to add this to my résumé.... I already have 2 years of experience with Swift!

  2. Re:Good bye source compatibility by angel'o'sphere · · Score: 5, Insightful

    Since when does Qt not work X-platform anymore?

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  3. Re:and it needs an new OS the mess up other apps by Anonymous Coward · · Score: 5, Funny

    and the comment grammar no sense slashdot article read.

    captcha: verbally. Seriously?

  4. Re:Good bye source compatibility by Anonymous Coward · · Score: 5, Funny

    Creating GUI's in OSX is currently problematic because of font issues.

    Obviously this must be the case as no-one else is creating GUIs in OS X either. That, and the fact that OS X is hated the world over by designers for it's awful handling of fonts.

  5. Re:Just what we need, another C++ clone by mark-t · · Score: 5, Funny

    ... a badly implemented subset of C++

    You mean like C++?

  6. Re:Since when does Qt "work" with OS X? by Kesha · · Score: 5, Informative

    There is VLC
    There is CMake
    There is my project -- https://sourceforge.net/projec...
    There is Sorenson Squeeze -- http://www.sorensonmedia.com/s...
    I am sure there are others

  7. Windows Phone and RT do not require C# by tepples · · Score: 5, Informative

    I was under impression that all new windows "apps" had to be written in C# against a new SDK that has neither binary nor source compatibility with Win32/posix/C/C++. I'd be glad to be wrong, but that's what I've seen so far.

    Only Windows Phone 7 and Xbox Live Indie Games required C#.* C++ works on Windows Phone 8 and Windows RT, though they do require use of the Windows Runtime API. For actual Windows on x86, you can continue developing desktop applications without having to deal with Windows Runtime (the "Metro" crap).

    * In theory, they required verifiably type-safe CIL compatible with the .NET Compact Framework. In practice, they required C#, as standard C++ is not verifiably type-safe, and DLR languages require functionality not in .NET CF.

  8. Compatibility is no problem, before or after swift by perpenso · · Score: 5, Informative

    Good bye source compatibility. We hardly knew ye.

    I have absolutely no compatibility problems. I strictly use objective-c for only user interface code. The core functional application code is written in c/c++. I have multiple iOS/Android apps whose core code is shared and can even be compiled with a console app under Mac OS X or Linux, I use this for regression testing and fuzzing. A headless Linux box in the closet exercises this core code. Similar story for Mac OS X and Windows.

    Swift code can replace objective-c code and it matters little to me. Has zero impact on other platforms I target.

    Admittedly I've ported other people's code between Windows, Mac and Linux for years and written my own code for Windows, Mac and Linux for years and as a result I am extremely aggressive about separating UI code from functional code.

    For those people using some sort of cross-platform wrapper for their project, if it supports Mac OS X objective-c it will probably support Swift. Even if it takes time for the wrapper developers so what, the use of Swift is entirely optional.

  9. Re:Since when does Qt "work" with OS X? by R3d+M3rcury · · Score: 5, Insightful

    There are plenty of apps that use QT--probably the most mainstream one is Google Earth.

    Now, look at me with a straight face and say, "And Google Earth has a great UI!"

    To me, this is the problem with cross-platform UI. It starts from a mistaken premise: Windows and Mac or iOS and Android have the same basic UI. There's even a grain of truth to it. But it doesn't really work.

    The example I love to use is French and English. They are, basically, the same language, right? They both have words, sentences, and paragraphs. They both have nouns, verbs, and adjectives. So if you just translate the words and move around the adjectives, you've got a French/English translator! It's that simple!

    No, not really. If it's 100 degrees outside and you've just come from the outside and remark to a pretty girl "Je suis chaud" (literally, I am hot), she might very well slap your face. Because you've just said that you are hot as in, "Oh, baby, you make me so hot."

    And those are the silly mistakes that cross-platform UIs make.

    Take a simple one from Mac versus Windows: On the Mac, in a dialog box, the default button is always the right-most button. So you have a dialog box that says, "Are you sure you want to do this?" and the right-most button would say, "OK" and the button to the left of it would say, "Cancel." On Windows, the default "OK" button would be on the left with the "Cancel" button the right of it.

    Alignment, again, is a question. I'm not sure there's a standard on Windows--I've seen things centered and I've seen them aligned right. On Mac OS X, there's a standard. Which means when Windows aligns them on the right like on the Mac, I'm always pressing the Cancel button.

    So, yeah, you can use QT to have a cross platform application and it will work fine. And it's great, if you have an application like Google Earth, which has lots of great GIS capabilities so that the result is worth the pain. But, frankly, if Microsoft did an equivalent to Google Earth but made a Mac application that was "correct," I'd use it in a heartbeat. Because, all else being equal, I'd rather have an application that "speaks my language" to one that only sort of does.

    Have you ever spoken to a tech support person from another country with a thick accent? That's the equivalent of using Google Earth on a Mac.