Skip to main content
edited tags
Link
daniero
  • 18.8k
  • 5
  • 52
  • 79
Tweeted twitter.com/#!/StackCodeGolf/status/434047944992780288
Source Link
daniero
  • 18.8k
  • 5
  • 52
  • 79

Code Romanization

The challenge is to make any Roman numerals valid code in your chosen language.

They should not appear inside of strings or anything similar, but work just like any other tokens, literals such as (Arabic) numbers, characters or strings; or variable/method/function identifiers, etc.

For instance, in Java, the following would have to compile and run just as if i was initialized to 42:

int i = XLII;

The actual parsing of the numerals is secondary, so you can use a library if you want to, but this is a popularity contest, so creativity is encouraged.

You cannot use any language that actually uses roman numerals, if there is such a thing.

Good luck.