Daniel Veillard wrote:
Nah, dynamic languages suck even more. Particularly interpreted ones. let ids = try List.map int_of_string (String.nsplit cpulist ",") with Failure "int_of_string" -> raise (VirshError (cpulist ": invalid format"))That's the same code (actually better - not only does it do the check, but it converts the CPU numbers to a list of integers for you), safer, the same speed as the C code, and a factor of 10 shorter.
Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
Description: S/MIME Cryptographic Signature