-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
Every single time I use one of these I want to type "max" or "min" until I remember "ah, right, I can't use well-established abbreviations here; I have to spell it all out, ugh".
The naming choices of @maximum and @minimum are weird and inconsistent for various reasons:
- "max" and "min" are very well established abbreviations for "maximum" and "minimum"; why do we have to spell it all out like that? It seems so extra.
- Abbreviations are used all throughout builtin function names. It's inconsistent and makes these two builtin functions stick out for no reason. If we don't want to use abbreviations, I guess we have to rename
ptrCasttopointerCast. "Max" or "min" are as much, if not more so, well-understood abbreviation for "maximum" and "minimum" as "ptr" is for "pointer". - Every developer expects these to be called "max" and "min". Most libraries/languages etc. use the abbreviations.
- They didn't do the same mistake in
std.math: it's notstd.math.maximumInt, it'sstd.math.maxIntand it's notstd.math.maximum, it'sstd.math.max, and so on.
So these builtin function names are inconsistent withstd.math's equivalents (whatever the difference between these is supposed to be, anyway) as well. Especially if you change between the builtin functions andmath.maxormath.min, this weirdness in naming becomes especially noticeable and awkward.
leecannon, rlapz, IntegratedQuantum, horenso, alichraghi and 13 moreominitay
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.