Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 15 submissions in the queue.
posted by martyb on Friday December 04 2015, @06:52PM   Printer-friendly
from the Is-that-you-Jonathan? dept.

Swift Is Open Source

Swift, Apple's hot new programming language, is now open source. It is available (or will be once the web site isn't so overwhelmed!) for Mac and Linux under an Apache 2.0 license.

"Swift is now open source! We are excited by this new chapter in the story of Swift. After Apple unveiled the Swift programming language, it quickly became one of the fastest growing languages in history. Swift makes it easy to write software that is incredibly fast and safe by design. Now that Swift is open source, you can help make the best general purpose programming language available everywhere. "

Apple Open-Sources Swift and Releases Linux port, as Promised

Apple's Swift programming language may eventually replace the respected but arcane Objective C as the native language for OS X and iOS development, but if you don't have a Mac you might be forgiven for not having taken an interest so far.

However, as MacRumors now reports, Apple have now delivered on their promise to open-source Swift and release a Linux port. It doesn't sound as if the Linux port is quite ready for production use just yet, but the source is out there. Does this mean that Swift is now a contender for general purpose programming?

(Note: at the time of writing, the servers at Swift.org are failing to live up to their name.)


Original Submission #1Original Submission #2

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by vux984 on Wednesday December 09 2015, @05:26AM

    by vux984 (5045) on Wednesday December 09 2015, @05:26AM (#273811)

    No because APIs define their parameter types.

    Nitpicking. If you can't think of a situation where automatic type inference failed, or created problems down the road in maintenance you aren't trying.

    You're dropping curly braces in order to get the indentation

    Essentially yes.

    Which is backwards.

    I disagree.

    Again you are suffering from repeating yourself.

    No, I only enter the braces, the editor does the indentation. The information is 'repeated' but its not extra work for me.

    With Python you just deal with the primary issue - make the indentation show the block structure you want.

    Except that whitespace is incredibly fragile; and poorly preserved by all kinds of common text editing applications and operations. And you don't really edit it, you use it to 'push' other things around.

    Mentally converting from one thing to another

    Entering whitespace is no less a mental conversion. You want the code to be 'here' so you hit 'tab' and 'space' and 'delete' to push and pull it around, because you can't just tell it ... be HERE. Proper delimiters are at least less work to enter, and can automatically reform to an indented state if the whitespace/indenting gets mangled. And if you delete one by accident, its trivially detected that they aren't balanced. Delete an indent level somehwere by accident and the code just does something different.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by BasilBrush on Thursday December 10 2015, @03:58PM

    by BasilBrush (3994) on Thursday December 10 2015, @03:58PM (#274493)

    Nitpicking. If you can't think of a situation where automatic type inference failed, or created problems down the road in maintenance you aren't trying.

    It's ALWAYS possible to create bugs by editing code. The point is that repeating yourself makes it more likely rather than less.

    Except that whitespace is incredibly fragile; and poorly preserved by all kinds of common text editing applications and operations.

    Then don't use broken tools. We're not in the 1970s anymore.

    Entering whitespace is no less a mental conversion. You want the code to be 'here' so you hit 'tab' and 'space' and 'delete' to push and pull it around, because you can't just tell it ... be HERE.

    Again you have a tool problem. Or you need to learn it. You suggest the editor is clever enough to reformat code based on braces. But it doesn't have indent and unindent operations???

    --
    Hurrah! Quoting works now!
    • (Score: 2) by vux984 on Thursday December 10 2015, @07:23PM

      by vux984 (5045) on Thursday December 10 2015, @07:23PM (#274590)

      The point is that repeating yourself makes it more likely rather than less.

      More likely that you make a simple compile time error; but less likely that you make a program logic error. Compile time errors are trivial to fix by comparison and worst case make you re-think program logic which is a good thing.

      Then don't use broken tools. We're not in the 1970s anymore.

      Quite. But I consider it a hallmark of a good language that I can work with it in notepad / vi /vim / textedit if I have to.
      A language that can only be efficiently worked on in a special tool is broken by design. Almost as bad as languages which have proprietary non-plaintext formats for the source.

      Again you have a tool problem. Or you need to learn it. You suggest the editor is clever enough to reformat code based on braces. But it doesn't have indent and unindent operations???

      Not at all. Entering curly braces just requires typing single characters where needed, and then hitting the button to reformat. If I'm moving code around between indent levels but not changing the logical structure (e.g. I'm copying code from outside a loop to inside the loop, I can just copy/paste and reformat.

      With white space, I have to highlight the blocks that need to be indented first, that's more effort than just dropping a single curly brace. And when I'm copying code around but not changing the program structure -- if the code is being moved between indent levels I have to fix them manually.

      Plus if I copy/paste some code snippet or function to a forum or a word document or an email or chat messenger tool or IRC or skype anything else that ISN'T a "programming tool", and which is often quite hostile to whitespace I infinitely prefer to have the code retain its correctness so that the recipient can copy it back out and it just works, and they can hit a hotkey to reformat it.

      Whitespace should not used as anything more than an elementary delimiter. Whitespace as program flow semantics is idiotic.
      The improvement in "readability" by not having braces is minimal, and not worth anything to me, while the costs imposed by working with it are significant and unjustifiable.

      • (Score: 2) by BasilBrush on Friday December 11 2015, @10:09PM

        by BasilBrush (3994) on Friday December 11 2015, @10:09PM (#275176)

        You quoted but didn't understand my point. You take it as an assumption that there is a "format button" that knows how to auto-format code in your chosen language. But you also take it as an assumption that the editor doesn't make indenting and unindenting and copy/pasting between indent levels easy.

        This means that you only have experience of editors that understand C but not editors that understand Python. Or that you've never actually used Python. Either way it's a lack of experience on your part.

        --
        Hurrah! Quoting works now!