[Swift-devel] Call function.

Ben Clifford benc at hawaga.org.uk
Tue Aug 16 07:55:59 CDT 2011


On Aug 15, 2011, at 6:47 PM, Mihael Hategan wrote:

>> 
>> 1. Keep them in the same namespace, treat all procs as if they were
>> equivalent to name = signature {body}. Disallow variables and procedures
>> with the same name.
>> 2. Do not keep them in the same namespace and consider the namespace
>> implicit in the type. So if I assign to a non-procedure type then it's a
>> normal variable, and if I assign to (or use in the context of) a
>> procedure type, then it's a procedure. This could be confusing to a user
>> and it requires one to look at the context of an expression to determine
>> its type, which complicates the compiler code.
>> 3. Have some special keyword that indicates the procedure namespace:
>> myfn= proc f (or myfn = proc(f) or myfn = proc:f).
>> 
> 
> Ok, so let's make this democratic. Opinions, preferences?


I prefer something like 1. 3 is ok - I think its unnecessary keywordage but fine otherwise. not 2.

-- 




More information about the Swift-devel mailing list