3 ms·
i think thats a reasonable opinion in the context of say, language implementation. for the relatively simple case of parsing cli arguments i would want an equa
by iovrthoughtthis 5y ago
i think thats a reasonable opinion in the context of say, language implementation.
for the relatively simple case of parsing cli arguments i would want an equally simple api. "is this string a valid representation of a number?" and "what number does this string represent?" should be separate apis.
even in language implementation, i'd want the identification of number tokens to be separate from the parsing of those number tokens. i would then have another, separate api for "where does the first number end in this string?" which would probably more likely be "return to me the next substring from this string that represents a number"