-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Naming discussion: count_{en,de,trans}codable #16
Comments
I was hoping somebody'd chime in, even after I posted it on Twitter, but nobody's really saying much. If you've got friends, let them know. |
I am not a native speaker, and do not know exactly what is meant, but: You count things that you have. In this sense I would understand the difference between 'count' and 'infer'. If this were meant, 'infer' would indeed be more accurate in my humble opinion. (And another crisply short 5-letter word, of which your language is so wonderfully rich). |
another 5-letter verb is 'deduc'... |
I think |
or predict_ ? |
Some more discussion on twitter: https://twitter.com/__phantomderp/status/1421710921110589443 In particular, "count as [if]" can be interpreted as not actually doing the work (see OP), but I still think "infer" does that better - and if "count" is an important marker (cf. STL), it could still be kept as a noun: |
Okay. We're going to go with one of 👀 for Also, twitter poll: https://twitter.com/__phantomderp/status/1424243292015841281 |
I think you meant |
One argument against 'infer' on twitter was that it implies it could go wrong. |
Regarding the uncertainty that people seem to associate with "infer", this is IMO a recent change in meaning because "infer"/"inference" is used in many scientific fields where the answers can never be known with certainty. The dictionary leaves not much room for failure though (there's various definitions on that site, but they all paint the same picture): infer(ɪnˈfɜː)
|
I think that little mix up is a good illustration of the risks of having the Still, my position is actually not as decisive as it might seem - |
OK, But is what is done trivial (in the sense of 'count_as_dozen(24) -> 2' |
What is done is trivial. But, |
This has now been implemented with the voted-on changes. Should appear in documentation in a bit. |
First off, thanks a lot for the awesome work you're doing! 🙃
I have been loosely following @ThePhD's stream (flood?) of papers & blog posts, and was wondering about a naming discussion they had posed on twitter a while ago.
Naming is hard, though worth it - the right name substantially reduces cognitive overhead, especially when accumulated over a long period of time. Since I was intrigued by the riddle of squaring that circle, I had written to @ThePhD with a suggestion, and they suggested to open an issue here.
One of the key points about the
count_*
functions that doesn't exactly jump out from the documentation (at least to me) is that the actual work of encoding/... (especially around memory allocation etc., AFAIU) is not being done. Quoth @ThePhD (in private communication):Since I wasn't warming up to
count_encodable
et. al (it's not intrinsically obvious to from the name whether things are being counted before or after the operation. The "-able" suffix makes it seem like it could be the former - "these code points are encodable [into code units], now count them"), I wanted to come up with something that more intrinsically reflects the absence of real work™.My suggestion boils down to changing the verb from
count
toinfer
, freeing up the participle to rejoin the party unburdened of assumed labour. IOW:infer_encoded_{size,length,count}
count
could even make a comeback as a noun, but whether the choice issize
,length
orcount
is (from my POV) not that important.I have no beef with the
validate_*
functions (whose expressiveness I applaud), so, to sum up my proposed answer to the initial riddle from the tweet (using my preferred nounsize
, if only due to its lack thereof, typographically speaking):Thanks for reading!
The text was updated successfully, but these errors were encountered: