What advice (tips, techniques, gotchas, et cetera) do you have for someone who is porting a code library from one language to another, or rewriting it to work in a different compiler, environment?
What tips can you offer to someone porting code?
porting
Every platform (language and system libraries) has its own persona.  The way a Ruby programmer designs their API takes advantage of the unique features and culture that make Ruby what it is.  This is distinctly different than the way a C or C++ developer would design their API, which is in turn different from the way a Java or C# developer would do it.You want to take the ideas from the original platform, and mold them into the concepts that make the new platform what it is.  Nothing feels less natural than using a library designed in a completely different manner than the other libraries in the platform.  There's a number of programming platforms that are actually well designed, and elegant.  You want to leverage those strengths for your port.