I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type . In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1]. EDIT: Some of yo…
A word for a value between 0 and 1 (inclusive)
121–130 of 325 posts
Re: A word for a value between 0 and 1 (inclusive)
#122Earlier quoted context omitted.
I'm envisioning a programming language in which variable names and type names can become one. So instead of func call(Person person){} you just have func call(person){} where person is a known type AND the variable name. In that scenario 'accuracy' would be a type with known value between 0 and 1.
what if you have to deal with two persons?
func call(person#1 person#2){}
Re: A word for a value between 0 and 1 (inclusive)
#123I don't know latin, but perun, perune, peruni?
Re: A word for a value between 0 and 1 (inclusive)
#124Earlier quoted context omitted.
percentage is 0 to 100, though. (Or even more, saying 200% is not technically wrong depending on context)
Depends how you look at it, I guess. 0 to 100% translates to 0 to 1. edit: but I guess it is wrong, because % is ambiguous - it can mean fraction, it can mean growth
Re: A word for a value between 0 and 1 (inclusive)
#125Out of the answers there I like AccuracyNormalized best.
That immediately conveys (to me at least) what it is and what its magnitude will be bounded by.
Or...if you were writing Java or Swift
NonNegativeMagnitudelessFractionalQuantity
Re: A word for a value between 0 and 1 (inclusive)
#126I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type . In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1]. EDIT: Some of yo…
I think this is the best answer. This got me thinking: What about a situation where the accuracy is given in a real-life unit. For example, the accuracy of a GPS measurement, given in meters. I've sometimes used names like 'accuracyInMeters' to represent this, but it felt a bit cumbersome. Edit: Thinking more about it, I guess you could typealias Float to Meters, or something like that, but also feels weird to me.
Re: A word for a value between 0 and 1 (inclusive)
#127Earlier quoted context omitted.
The question was about the parameter name , though. The correct answer seems to be: function FuncName(UnitInterval accuracy)
UnitInterval seems to contains an interval , not a single float. I don't think it's a very good name. UnitIntervalNumber would be better, but it's too long. Something like UnitNumber or UnitFloat could maybe work.
I have actually used intervals, and should have realised this sooner. But I just had my first cup of coffee...
Re: A word for a value between 0 and 1 (inclusive)
#128"Normalized". That's what we call data that have been scaled to fit on a tidy axis.
Re: A word for a value between 0 and 1 (inclusive)
#129Earlier quoted context omitted.
Yeah, this is a pretty significant difference between a set and an element.
The fix is simple: Put the type of the variable in the type name. Then "UnitInterval proportion" tells you everything you need to know.