[Swift-devel] Call function.

Ben Clifford benc at hawaga.org.uk
Thu Aug 11 14:09:01 CDT 2011


> 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.

This is what both C and Haskell do, very roughly. 

C has a distinction between functions directly defined, and functions 
being referenced (by a pointer) - the name of the function invoked as 
f(x); in the first case, and (*f)(x) in the second case. Haskell treats 
them the same: f x

The other two options you give look ugly to me.

But this project is not about abstract PL research/development - what 
makes this stuff easier to use?

I'm inclined to think some function type (rather than strings) does, (but 
I'm very into compile time safety so that's unsurprising) but I'm not sure 
if its worth the effort for what I think is a fairly restricted use case.

-- 




More information about the Swift-devel mailing list