Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Sunday June 14 2015, @10:44PM   Printer-friendly
from the swift-rise-in-popularity dept.

The hype around Swift is near non-existent by Apple standards, yet the language has attracted high praise since its release last year. Swift is essentially one of the very few Apple products representing a clear departure from the hardware-led approach Steve Jobs took to the business. If Stack Overflow's 2015 dev survey is anything to go by, it looks as if the Swift language might have potential to really shake things up.

Might the days of Apple programmers relying upon objective C be numbered?


Original Submission

 
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: 4, Insightful) by c0lo on Monday June 15 2015, @11:00AM

    by c0lo (156) Subscriber Badge on Monday June 15 2015, @11:00AM (#196421) Journal

    This is a replacement of the professional languages both for apps and systems

    Groan... Really? [wikipedia.org]

    Swift uses Automatic Reference Counting (ARC) to manage memory. Apple used to require manual memory management in Objective-C, but introduced ARC in 2011 to allow for easier memory allocation and deallocation.[29] One problem with ARC is the possibility of creating a strong reference cycle, where instances of two different classes each include a reference to the other, causing them to become leaked into memory as they are never released. Swift provides the weak and unowned keywords that allow the programmer to prevent strong reference cycles from occurring. Typically a parent-child relationship would use a strong reference while a child-parent would use either weak reference, where parents and children can be unrelated, or unowned where a child always has a parent, but parent may not have a child.

    Because... you know?... there's never going to be a relation between siblings, it will always be an asymmetrical parent-child-like relationship.
    Yes, circular lists or bidi-graphs with cycles are evil constructs one is never going to need in practice.

    Those foolish younsters with disdain for ancient wisdom [catb.org] are in for surprises:

    One day a student came to Moon and said: “I understand how to make a better garbage collector. We must keep a reference count of the pointers to each cons.”

    Moon patiently told the student the following story:

    “One day a student came to Moon and said: ‘I understand how to make a better garbage collector...

    --
    https://www.youtube.com/watch?v=aoFiw2jMy-0 https://soylentnews.org/~MichaelDavidCrawford
    Starting Score:    1  point
    Moderation   +2  
       Insightful=2, Total=2
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   4  
  • (Score: 3, Touché) by BasilBrush on Monday June 15 2015, @03:23PM

    by BasilBrush (3994) on Monday June 15 2015, @03:23PM (#196535)

    Really.

    Because... you know?... there's never going to be a relation between siblings, it will always be an asymmetrical parent-child-like relationship.
    Yes, circular lists or bidi-graphs with cycles are evil constructs one is never going to need in practice.

    Just because it is possible to write software that has circular references, doesn't mean that properly written software ever has them. Put the correct attributes on properties and there is no problem I've been programming with ARC for years and literally never had a bug of that nature.

    ARC is NOT a garbage collector. That's your first mistake.

    --
    Hurrah! Quoting works now!
  • (Score: 2) by kaszz on Tuesday June 16 2015, @06:27PM

    by kaszz (4211) on Tuesday June 16 2015, @06:27PM (#196975) Journal

    "to allow for easier" alright, then only idiots will use it .. ;-)

    It sounds more and more like Swift might be useful to learn if creating apps for iPhone is your task. Otherwise it's just another NIH thing waiting to be scrapped.