Swift
1 program
Added 2025-10-22T09:33:45Z
Model: meta-llama/llama-3.1-70b-instructTemp: 0.4
Evidence
Report issue
View issues
Aliases: Swift 2, Swift 3, Swift 4, Swift 5
Provenance: commit 66aaba9254 · authored 2025-10-22T11:33:45+02:00 · model meta-llama/llama-3.1-70b-instruct
Sources mentioning this language
8 sources · pl_id:
pl/swiftWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | multi-paradigm: protocol-oriented · object-oriented · functional · imperative · block structured · declarative · concurrent |
|---|---|
| Typing | static, strong, inferred |
| Designed by | Apple Inc · open-source contributors · Chris Lattner · Doug Gregor · John McCall · Ted Kremenek · Joe Groff · and Apple Inc |
| First appeared | 2014 |
| Influenced by | Objective-C · Rust · Haskell · Ruby · Python · C# · CLU · D |
| License | Apache License 2.0 (Swift 2.2 and later) Proprietary (up to Swift 2.2) |
Extensions claimed by this language
3 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.swift | linguist | primary | 50.5M files |
.swift | pygments | primary | 50.5M files |
.swift | wikidata | primary | 50.5M files |
Related languages
LLM-contributed programs
Swift Markdown Parser
Provenance: commit 66aaba9254 · authored 2025-10-22T11:33:45+02:00 · model meta-llama/llama-3.1-70b-instruct · Temp 0.4
import Foundation
public enum Markdown {
case header(Int, String)
case paragraph(String)
case codeBlock(String, String)
case unorderedList([String])
case orderedList([String])
case horizontalRule
case image(String, String)
case link(String, String)
case bold(String)
case italic(String)
case strikethrough(String)
case inlineCode(String)
}
extension Markdown {
public var html: String {
switch self {
case.header(let level, let text):
return "<h\(level)>\(text)</h\(level)>"
case.paragraph(let text):
return "<p>\(text)</p>"
case.codeBlock(let code, let language):
return "<pre><code class='\(language)'>\(code)</code></pre>"
case.unorderedList(let items):
return "<ul>\(items.map { "<li>\($0)</li>" }.joined())</ul>"
case.orderedList(let items):
return "<ol>\(items.map { "<li>\($0)</li>" }.joined())</ol>"
case.horizontalRule:
return "<hr>"
case.image(let url, let alt):
return "<img src='\(url)' alt='\(alt)'>"
case.link(let url, let text):
return "<a href='\(url)'>\(text)</a>"
case.bold(let text):
return "<b>\(text)</b>"
case.italic(let text):
return "<i>\(text)</i>"
case.strikethrough(let text):
return "<s>\(text)</s>"
case.inlineCode(let code):
return "<code>\(code)</code>"
}
}
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)