> +1 -- terseness is a virtue in a language, but this seems to be taking it
> to a bit of an extreme. I refuse to believe that the extra milliseconds
> saved by typing "fn" instead of "function" makes a difference in
> productivity,
>

The Javascript committee is spending a *huge* amount of effort right now to
improve JS's function syntax moving forward in part because "function" *is*long.


> so I presume this choice is deliberate in that it is believed to *improve*
> readability? If so, may I gently offer a contrary opinion; words are more
> readable than abbreviations, and it's not clear (to me, anyway) that the
> shortened keywords meaningfully improve things.
>

<puts on English nerd hat> "fn" is still a word.

I would actually argue in favor *for* abbreviated keywords:

1. Any user will need to know them anyway, so it's not like they need to be
explicitly read and comprehended at each site where they appear. From that
angle, any token is as good as any other.
2. Using an abbreviation leaves the full word available as an identifier.
Now you can have a variable named "function" in your code.

I don't presume to dictate the design of your language, but I have noticed
> that languages that adhere more closely to an established language tend to
> have an easier time attracting converts (Java, JavaScript, Go).
>

Most established languages *do* use abbreviations: int, const, float, bool,
extern, enum, typedef, etc. Go chose "func" for function.

(Having said that, "ret" and "cont" seem a bit perverse to me. <shrug>)

- bob
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to