3 ms·
Implicit main in Swift means you don't need "public static void main..." or other boilerplate. No reason why Java and C++ couldn't do something similar though.
by musicale 4y ago
Implicit main in Swift means you don't need "public static void main..." or other boilerplate.
No reason why Java and C++ couldn't do something similar though.
- astrange 4y agoTop level programming is actually a little too surprising in Swift. For instance, you can access variables before they're declared - so you're not just implicitly inside a main function.