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, Swift (programming language), swift
Provenance: commit 66aaba9254 · authored 2025-10-22T11:33:45+02:00 · model meta-llama/llama-3.1-70b-instruct
Merged records (3)
Sources describe this language in separate records, kept as they are. They were
joined by explicit decisions in data/curated/pl_links.csv
(concept concept/repo/Swift); names of merged pages are listed as aliases above.
- Swift
repo/Swift· this page · primary · sources: llm-campaign · evidenceL-e779278697same_aspl/swift-programming-language: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30) - swift
pl/swift· record without its own page · sources: hyperpolyglot, linguist, pldb, pygments, rosettacode · Wikipedia · Q17118377 · PLDBL-2bf93a3ceesame_aspl/swift-programming-language: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30) - Swift (programming language)
pl/swift-programming-language· had its own page, merged here · sources: hyperpolyglot, pygments, wikipedia · Wikipedia · Q17118377L-2bf93a3ceesame_aspl/swift: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30)L-e779278697same_asrepo/Swift: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30)
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 | 72.6M files |
.swift | pygments | primary | 72.6M files |
.swift | wikidata | primary | 72.6M files |
Related languages
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.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
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>"
}
}
}