A little of coordination for Rosettacode

bearophile bearophileHUGS at lycos.com
Sat Feb 16 04:06:02 PST 2013


Jos van Uden:

> It's fine, but we need another write at the end of run 
> otherwise the final state doesn't get written.

OK. Feel free to fix the code:
http://codepad.org/MvpSET1I

Writing good enough code is an iterative process... And this code 
will probably need few more iterations.


> I'm thinking about putting the definitions in xml,

Please no :-) Especially in a such small program.


> BTW, the reason I used a class is that it forces you to 
> instantiate through the constructor.
>
> If you use a class and write:
>
> (new UTM().run()); // fails at compile time
>
> If you use a struct and write:
>
> UTM().run(); // fails at runtime

OK, feel free to change back the code to a final class. We'll try 
to find a better solution in successive iterations.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list