DEV Community

Discussion on: Ancient computer science: Let's build a Roman numeral converter from scratch πŸΊπŸ“œ

Collapse
 
jayjeckel profile image
Jay Jeckel

Very fun puzzle and a great article as well!

Interesting additional information, the rules that we consider normal for Roman numerals are actually a fairly modern invention. The simplest example is that IIII was often used instead of IV, and still is in some cases such as certain clocks. There were also cases of multiple leading subtractive symbols being used, such as IIXX for 18 instead of XVIII, due to how they spoke, in this case "two from twenty".

Such an interesting problem, seems simple on the surface, but the deeper you dig the more edge cases their are.

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you very much, glad you enjoyed it! I didn't know that, thank you! The code in the article is not really capable of handling, for example, the IIXX case, even though it probably wouldn't take much to cover that, too. It's something I really like about our number system today: There's only ever one way to write a number (that is, if you don't count mathematical expressions or complex numbers...)

(Sorry for the late reply)