-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels