4 ms·
Swift is statically typed and a “Hello, World!” in Swift is just print(“Hello, World!”).
by saagarjha 8y ago
Swift is statically typed and a “Hello, World!” in Swift is just print(“Hello, World!”).
- sanderjd 8y agoSo going back to the original commenter's points: how does Swift handle top-level code? Where is it legal for me to write print("Hello, World")?
- saagarjha 8y agoAnywhere outside of things like a class or structure definition, if you have a single-file project. In a multi-file project, only in main.swift.
- deleted 8y ago[deleted]