victor-mntl
11/20/2019, 6:02 PMfun main(args: Array<String>)
function is permited to be simplified as fun main()
(when the entry arguments are not used).
My suggest is that, when the arguments of the entry main
function ARE used, the IDE/Compiler may accept just fun main(args)
, assuming the type of args
would be Array<String>
.Ruckus
11/20/2019, 6:16 PMfun main(args)
isn't.Ky Leggiero
11/20/2019, 11:25 PMCommandLine.arguments
https://developer.apple.com/documentation/swift/commandline/2294816-argumentskioba
11/21/2019, 10:07 AMprivate val commandLine: CommandLine
in the file?Ruckus
11/21/2019, 3:24 PMKy Leggiero
11/24/2019, 10:22 PMprint(Int(CommandLine.arguments) == 42)
Ky Leggiero
11/24/2019, 10:23 PM