brownplt / pyret-lang

The Pyret language.
Other
1.06k stars 106 forks source link

function names inconsistent #1731

Open shriram opened 3 months ago

shriram commented 3 months ago

Because numeric functions are num-, we have num-to-string. But string names are string-, so we have string-to-number.

So if you look up the latter and write string-to-number, do whatever processing, and then want to invert it and type number-to-string, you get an error! This must be really frustrating, because now you have to go look up documentation and lose your concentration. (I rediscover this the painful way, then remember the num- rule, but if it's your first encounter you have no reason to believe the sensible name wouldn't work.)

Therefore, we should add number-to-string, and likewise look for other local consistencies that become global inconsistencies.