Talk:Swift (programming language)
This is the talk page for discussing improvements to the Swift (programming language) article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1Auto-archiving period: 6 months ![]() |
This is the talk page for discussing improvements to the Swift (programming language) article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1Auto-archiving period: 6 months ![]() |
![]() | This article has not yet been rated on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
|
Swift 'influenced by' needs changing
I second that Swift is heavily influenced by the ML family of languages, Scala, Ocaml, and particularly F#. For example; Joe Pamer was a lead developer on F#.
Swift makes the normal sacrifices for ObjC compatibility that Scala and F# do for the JVM and .Net.
Swift does not have all that much common with Groovy.
I'm waiting to see a good blog post on this before I propose a change and add a reference.
Moloneymb (talk) 17:24, 3 June 2014 (UTC)
- "clearly influenced by" should probably be toned down until we get some actual references on Swift. Otherwise there's enough features in to claim influence by a grab bag of languages. Protonk (talk) 17:59, 3 June 2014 (UTC)
- Scala has been added, citing Adam Denenberg's "Hello Swift, Meet Scala" article. An article that notes commonalities between two languages but not direct influence is not valid for 'influenced by'. In this particular article most of the commonalities could be explained by the known influence of Rust on Swift; and other features like a
lazy
property/keyword are not unique to Scala. To date, none of the Swift language developers have noted a Scala influence, and we should not add Scala unless this changes. (Scala and Rust are both acknowledged as part of the 'ML extended family'. The recent popularity of ML-like languages is certainly interesting, but a whole other topic...) Hexene (talk) 23:22, 14 June 2014 (UTC)
- Agree. As much as I like Scala, the Scala-like bits can as easily have come from Rust and Haskell, two languages already on the list quoted from the primary developer. Scala should be off the list for the same reason that Groovy should continue to be kept off: we have a list from an official source, Swift has some similarities to bits from a boatload of languages, we don't want to list 95 different languages in the info box, and we don't want folks to promote their personal favorite language by adding it to the list. CarlRJ (talk) 23:30, 14 June 2014 (UTC)
- What about adding Scala in the Features section (where there are already comparisons to Java, Smalltalk, C, Obj-C, etc.). We can link the huffpo article (which is fine for a relatively minor claim) and note "Swift has some features in common w/ Scala e.g. type aliasing, spread parameters (whatever we're calling the underscore), etc."? Protonk (talk) 16:21, 15 June 2014 (UTC)
- I don't have *strong* views against, but I think comparing to Rust would make more sense. Hexene (talk) 20:32, 10 July 2014 (UTC)
- Whatever happened to this? Why isn't Scala on there? — Supuhstar * — 23:21, 10 February 2016 (UTC)
Proprietary to Open Source
Reading the third paragraph on the transition from a proprietary to open source language is a bit confusing, and (possibly?) also incorrect.
It states: Initially a proprietary language, version 2.2 was made open source and made available under the Apache License 2.0 on December 3, 2015, for Apple's platforms and Linux.
I don't know what if anything is added by stating which "version" was open sourced, but ultimately a saying the date in which Swift was open sourced seems more to the point. Also, what's confusing about saying which "version" was open sourced is that upon open sourcing, "2.2" didn't really exist. Work toward a 2.2 release was made open, and then finally announced a month after the open sourcing. ( https://swift.org/blog/swift-2-2-release-process/ )
I think simply stating the date Swift was open sourced and removing mentions of a version makes sense. Thoughts? Matt Yohe (talk) 05:19, 22 March 2016 (UTC)
- I agree. The licence does not even indicate that there is a certain starting point. The entire source code has been posted at GitHub, going back to the very first commit.–Totie (talk) 05:57, 7 April 2016 (UTC)
Not possible to read as standalone
This article is hard to follow for anybody who does not have good prior Objective-C knowledge. It reads more as a history of the language design than an introduction to the language itself. I think Swift (as other PLs) should be presented standalone rather than in a "while language X has feature Y, Swift was designed with feature Z because..." way. I do not have the necessary expertise to do it, however. --Alien Life Form (talk) 06:56, 8 April 2016 (UTC)
Example code is not example code
The section Example code is a series of short demos, introduced step-by-step; WP avoids anything like "how-to" info. Instead, example codes are supposed to give a feel for what actual code looks like, without any how-to. As such, it should also be fairly small -- certainly no more than a page. This was noted in a discussion above a year ago, and nothing has changed.
If someone can't give a an example of a Swift program, I'm for just removing it. --A D Monroe III (talk) 23:08, 18 July 2016 (UTC)
- I agree that it's a poorly written examples section. I'm not sure about deleting it completely, since it's a useful thing to have in a programming language article, but I wouldn't mind rewriting it. I could rewrite it as a couple of example programs (maybe Hello World and a slightly longer one) with a short description? Go and Perl seem to have well-written examples. I just noticed that Python doesn't have one, though, so I guess it's not universal. Pianoman320 (talk) 23:33, 18 July 2016 (UTC)
- I'm all for having an example; I'm just against this one. A new example of true simple use of Swift would be great, or two examples if the first is Hello World and the second is short. --A D Monroe III (talk) 14:59, 19 July 2016 (UTC)
- I think we should provide a properly referenced example as Wikipedia requires. Is anyone against that? Dgraemer (talk) 18:09, 19 July 2016 (UTC)
- The section can be shortened, but other than that I see no reason to make big changes to it. Apple’s documentation provides the ‘proper references’ for the syntax, the rest can be original.–Totie (talk) 18:28, 19 July 2016 (UTC)
- That is not possible as Wikipedia does not allow original research. Everything must have references. Dgraemer (talk) 19:06, 19 July 2016 (UTC)
- The section can be shortened, but other than that I see no reason to make big changes to it. Apple’s documentation provides the ‘proper references’ for the syntax, the rest can be original.–Totie (talk) 18:28, 19 July 2016 (UTC)
- I think we should provide a properly referenced example as Wikipedia requires. Is anyone against that? Dgraemer (talk) 18:09, 19 July 2016 (UTC)
- It would be very disruptive to apply OR to that level; more than half of WP would have to be deleted. Showing a simple example program is WP:BLUE to anyone that programs in the language, and helpful to other readers. Let's focus on helping them. --A D Monroe III (talk) 20:16, 19 July 2016 (UTC)
- You must provide a reference, as a program is not something trivial that everyone knows. Dgraemer (talk) 21:41, 19 July 2016 (UTC)
- There are literally millions other articles to pursue this on with more cause than here. Persisting here is only disruptive. The claim is off-topic anyway. No more responses to this. --A D Monroe III (talk) 21:52, 19 July 2016 (UTC)
Swift is the bank infrastructure for messages/payments
See http://www.riksbank.se/sv/Finansiell-stabilitet/Finansiell-infrastruktur/System-i-den-svenska-infrastrukturen/SWIFT/ --Mats33 (talk) 00:27, 18 September 2016 (UTC)
Someone Should Check Struct Copy On Write
"To ensure that even the largest structs do not cause a performance penalty when they are handed off, Swift uses copy on write so that the objects are copied only if and when the program attempts to change a value in them. This means that the various accessors have what is in effect a pointer to the same data storage, but this takes place far below the level of the language, in the computer's memory management unit (MMU). So while the data is physically stored as one instance in memory, at the level of the application, these values are separate, and physical separation is enforced by copy on write only if needed.[46]"
I am just learning Swift, but I know MMU's and this makes no sense for a struct that is not larger than at least a page, which is larger than most structs. The reference [46] is a long video, I scanned through it but could find no mention of this. Someone who knows Swift might either find a better reference if this paragraph is true, remove this paragraph if it is false, or qualify it that it is only used for large structs if that is the case. 73.93.154.221 (talk) 01:47, 22 December 2016 (UTC)
- All unassessed articles
- Pages using WikiProject banner shell with duplicate banner templates
- B-Class Technology articles
- WikiProject Technology articles
- B-Class Computing articles
- High-importance Computing articles
- All Computing articles
- B-Class Apple Inc. articles
- High-importance Apple Inc. articles
- WikiProject Apple Inc. articles
- Unassessed Apple Inc. articles
- Unknown-importance Apple Inc. articles
- B-Class Computer science articles
- Mid-importance Computer science articles
- WikiProject Computer science articles