You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By current design, Omninumeric tries to read from alphabetic numeral systems as permissively as possible. Numbers in ANS are not required to follow the system's rules for decorators by the book. For example, Cyrillic converter would render this: араi
as 1,111, even though the "thousand" mark before the leftmost a is missing.
Is this the right design choice or not?
Arguments for this design:
ANSs generally have many variations within themselves. Cyrillic has two styles of writing with "thousand" marks and a third style implementing something entirely different. Byzantine Greek sees use of both number-long overstroke and "keraia" symbol for marking a number. It seems only natural to read as permissive as possible from such variable systems.
Relaxed reading allows for relaxed regular expression. Stricter reading will require stricter regex, which at some point might become a pain in the back.
Arguments against this design:
A system is a system, however variable it can be. There are rules for writing numbers in those systems, not guidelines. It would be only natural to demand that numbers read obey those rules.
A "thousand" mark is not a decorator but a significant, meaningful component of a numeral - and a number. It would be irrational not to expect these marks be in order.
Wrong inputs and corresponding results should be the user's problem, not the programmer's.
Stricter rules for reading mean more concise conversion algorithm, and through that, better readability and sustainability.
The text was updated successfully, but these errors were encountered:
ENDrain
changed the title
Design: should reading from an ANS be permissive?
Design: should reading from ANS be permissive?
Aug 21, 2022
By current design, Omninumeric tries to read from alphabetic numeral systems as permissively as possible. Numbers in ANS are not required to follow the system's rules for decorators by the book. For example, Cyrillic converter would render this:
араi
as 1,111, even though the "thousand" mark before the leftmost
a
is missing.Is this the right design choice or not?
Arguments for this design:
Arguments against this design:
The text was updated successfully, but these errors were encountered: