A little of coordination for Rosettacode
Jos van Uden
usenet at fwend.com
Sat Feb 16 09:51:59 PST 2013
On 16-2-2013 18:23, bearophile wrote:
> The version you have put in Rosettacode is good, I have just added some missing tests at the beginning
> of the UTM constructor.
I added that precondition reluctantly, that's why its short :-). I really feel that
input validation should be done elsewhere.
I was thinking about adding a factory method to the UTM that accepts a string array,
parses and validates it, and returns a fully initialized immutable TuringMachine.
It would still be a lot of ugly code though.
That stronger typing can reduce the need for input checking is something I find
interesting. I'll have a look at the Ada code.
> (but we have also to benchmark if this doesn't decrease the program performance for a
> successive bigger Busy Beaver machine):
On the other hand, if we have stronger typing we may not have to do the rather expensive
checks that are currently in the loop.
More information about the Digitalmars-d-learn
mailing list