3 ms·
Actually, they could of borrowed from Python 3's type annotation syntax! [1] def hello(name : String) -> io String: [1] http://legacy.python.org/dev/peps/
by munro 12y ago
Actually, they could of borrowed from Python 3's type annotation syntax! [1]
def hello(name : String) -> io String:
[1] http://legacy.python.org/dev/peps/pep-3107/ http://legacy.python.org/dev/peps/pep-3107/
- seanmcdirmid 12y agoColon already means block in Python, overloading it for type annotations (ala pascal) would make the parser more complex and less error tolerant. Besides it is inconsistent, you really want def hello(name : string) : io String The only reason they didn't do that is because colon also means block....