Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by the_why_of_y

7 years ago

One aspect of this that you might be overlooking is that the syntax for function pointers has to follow the syntax of function declarations.

Why should a new language inflict this horror on its users:

let i32 (*foobar)(i32, i32) = add;

When it can do this instead:

let foobar: fn(i32, i32) -> i32 = add;

0 comments

the_why_of_y

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities