← Back to context

Comment by curist

2 years ago

Is having a dedicated fn keyword necessary? I mean, what’s the fundamental difference between a func and a fn ?

Not strictly necessary, we are not decided on it.

For func the annotation is required, while fn does not need any type annotation

  • I would strongly recommend to only go with one syntax, and not differentiate between regular functions and lambda statement

    • I disagree - allowing for type inference on the closures will make for a much more pleasant language, whereas requiring type annotations on top level functions makes sense for lots of reasons.

      3 replies →