[swift-users] Question out of curiosity: why "func"

Jim Malak Jim.Malak at beryle-lee.com
Mon Apr 4 09:25:01 CDT 2016


My background going into Swift was everything but JavaScript. One thing I often wondered about (usually every time I forgot to type it) is what purpose does requiring the keyword “func” serve when defining or decaling a function in Swift. I am not a compiler expert but intuitively it would seem that the function signature could be readily recognized by the complier and people alike with the presences of the ()’s at the end.

Just curious.


- Jim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160404/1378dafa/attachment.html>


More information about the swift-users mailing list