Zig: rename keyword "error" to "err"

Created on 4 Jul 2019  路  6Comments  路  Source: ziglang/zig

Both are English and err is shorter to type.

"Too err is human."

proposal

Most helpful comment

Both are English

If we are to consider that a factor: _err_ is a verb and _error_ is a noun. On those terms, the existing keyword makes more sense for its use case.

struct{} // noun
error{} // noun
err{} // verb

It would be more consistent with the errdefer keyword

Yep, but we also have anyerror.

All 6 comments

err is kinda ugly IMO. error looks good and is clear.

err is a good name for a variable of type error :)

It would be more consistent with the errdefer keyword

Both are English

If we are to consider that a factor: _err_ is a verb and _error_ is a noun. On those terms, the existing keyword makes more sense for its use case.

struct{} // noun
error{} // noun
err{} // verb

It would be more consistent with the errdefer keyword

Yep, but we also have anyerror.

maybe errdefer should be error_defer or error defer since error is already a keyword.

Yeah this was not productive.

Was this page helpful?
0 / 5 - 0 ratings