Hacker News new | past | comments | ask | show | jobs | submit login

Its arguably confusing, due to the lack of parentheses factoring a list of functions into one or more invocations. How is the nesting done here? Something more subtle. A lifetime of reading parenthesized functions is going to be confounded by changing the convention - which equals 'confusing'



I think you're probably overestimating the difference. Here is an algorithm for mechanically transforming a C function call to a Haskell function call:

    for all arguments in the function
        if the argument is not a symbol surround it with parentheses
    delete all commas
    delete the two initial parentheses 
And an algorithm for converting Haskell calls to C calls:

    put an open parenthesis between the first expression and second expression
    put a close parenthesis at the end of the expression
    put commas between all expressions between these two parentheses
The fact that it's so easy to convert between them highlights to me that they are both pretty easy.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: