Re: RE: [PEAR] [ANNOUNCEMENT] Numbers_Words-0.7.1 (beta) Released.
| From: | David Costa | Date: | Tue, 25 May 2004 15:11:01 +0000 |
| Subject: | Re: RE: [PEAR] [ANNOUNCEMENT] Numbers_Words-0.7.1 (beta) Released. | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29641@lists.php.net to get a copy of this message | ||
On May 25, 2004, at 5:04 PM, Antonio Carlos Venancio Junior wrote:
snipping the History lesson ;)Yes, you _can_. Roman number representation follow some simple rules (regular expressions ...). The following are some general rules for constructing Roman numerals: ----------- - Characters are additive. I is 1, II is 2, and III is 3. VI is 6 (literally, “5 and 1”), VII is 7, and VIII is 8.
. CI is 101; IC is not even a valid Roman numeral (because you can't subtract 1 directly from 100; you would need to write it as XCIX, for 10 less than 100, then 1 less than 10).Thanks for sharing. That said Romans used to have alternate methods, see Klaus post on this regard. BTW I do know how the conversion works ;)
----------That is not really accurate, there is a way to transform numbers to numerals over 3999 and I have implemented these methods in the last beta. Sorry but I don't measure my code in milliseconds, it might be a problem for you but speed is hardly an issue here.So do you remember that there is no representation for zero (0), for example. The numbers goes from 1 to 3999 (including them). I'm warning you aobut that now about that and asking you to change it. If you are in doubt please try to search the web for the rules to represent roman numbers. The rules above are a very good start. If you follow them the code will be faster.I would strongly vote against you on the QA team because, in lieu of kindly and politely suggest a change, you came in and said "I ask permission to change the code" claiming something about speed (non existing issue in a static method).Of course if this is bad for your personal use, feel free to fork your own version and do it your way, by all means this is something you can do.That's why we need a QA team. This package certainly whould not be aproved that way. I just made an "expect to fail" test to the class that not failed. That's the basics. --
Perhaps I didn't express myself correctly. You are welcome to post a patch if you want. Every contribution is very welcome. This is however not binding. Regards, David Costa http://pear.php.net/user/gurugeekQA should act in extreme situations not when/if someone like you doesn't like the API. So your approach was wrong.Sorry, but I think you missunderstood that. I'm not complanning about the API, but about the correctness of what the class should make.Just because you might have karma (I don't know as have never seen something substantial committed by you) this doesn't mean you can change a code if you don't like it. Not even if you are on QA.That`s why I've asked you in the first mail ...