Hacker News new | ask | show | jobs
by FpUser 2456 days ago
At the very first glance: what is wrong with

    function xxx()
instead of

    fn xxx()
what are we trying to save here?

Also would be nice to do import instead of @import. More readable I think.

Afraid to dig deeper as I do not have time to play with the languages that I can not yet use in production.

1 comments

The @ indicates that the function's built into the compiler itself. Yeah, it looks ugly, but it's nice to be able to visually identify "okay, yeah, this didn't come from any of my imports", and also (I'd assume) avoids cases where one might inadvertently shadow them with their own function definitions.

Re: fn v. function (v. fun v. def v. defun v. defn v. define v. proc v. sub v. label v. the cornucopia of other options here): I don't think it's all that big of a deal. fn does happen to be short, which means more actually-useful information can fit into the same line, so I guess that's nice. The choice of keyword for function definition feels like a really weird criticism.