When involved in this kind of activity, you may not only expand your own skill set but you may also gain new insights about the programming language of the original tool.
True... but it always makes me squemish. It's much better to reuse something. Sometimes however... it just isn't possible and you have to rewrite.
A really good example of this is SQL functionality for different databases. If a language has sockets it's often quite a good idea to have the SQL code for that language written *in* that language rather than using the C lib for the database in question. Why? well character encoding, exception handling and lots of other things that C doesn't do might be easier if you didn't call C.
Wouldn't it be nice if we had a modern unix with a C library supporting exception handling and unicode and all that goodness.
I'm with nic on this one. There are rare circumstances when it's not a bad idea, but usually it is. Unless you're doing it solely for educational purposes, in which case go for it.
Discussion (2)
True... but it always makes me squemish. It's much better to reuse something. Sometimes however... it just isn't possible and you have to rewrite.
A really good example of this is SQL functionality for different databases. If a language has sockets it's often quite a good idea to have the SQL code for that language written *in* that language rather than using the C lib for the database in question. Why? well character encoding, exception handling and lots of other things that C doesn't do might be easier if you didn't call C.
Wouldn't it be nice if we had a modern unix with a C library supporting exception handling and unicode and all that goodness.
I'm with nic on this one. There are rare circumstances when it's not a bad idea, but usually it is. Unless you're doing it solely for educational purposes, in which case go for it.