3 ms·
> I particularly abhor Go style uppercase for public visibility and much prefer Rust's explicit syntax. I don't want to comment on Go's visibility here, but is
by ByteJockey 4y ago
> I particularly abhor Go style uppercase for public visibility and much prefer Rust's explicit syntax.
I don't want to comment on Go's visibility here, but is it that much different than how in Rust the lack of a semi-colon means you're returning (or the presence of a semi-colon means it's an expression instead of a statement, which has tripped me up many more times than the inverse)?
- guitarbill 4y agoI suppose in a way it is. With the semi-colon, it's present or not. Whereas uppercase for export is kind of mixing information. The casing of identifiers is syntax, not just stylistic - but only the first character. Otherwise, it's just for readability (e.g. valueOf vs valueof). Which has interesting consequences, e.g. for non-ASCII identifiers where there is no concept of lower- or uppercase: https://go.dev/doc/faq#unicode_identifiers https://go.dev/doc/faq#unicode_identifiers Whether or not this bothers you is a different question.