Bill Roper (billroper) wrote,
Bill Roper

On the Drift

I have just finished porting a big chunk of code from our Java implementation back to our C++ implementation.

I swear that the thing that will kill me is the continuing drift between the two implementations. There are many lovely new methods that I have coded in Java that had to be ported back to C++ so that I could call them there. And in Java, it's an OK thing to return a List<Something>. In C++, you want to create a CArray<Something*> and pass the reference into the method that in Java is returning a List<Something>. So the method signatures get screwy as you copy code back and forth. And "." turns into "->" or vice versa.

Eventually, I also need to clean up the variant versions of the camelCasing between the two implementations so that the old C++ IsSomething() ends up being the Java-style isSomething() on both sides of the great divide. As it is, the Java code is partially converted to the new style, as is the C++ code. But not all of the same methods have been converted on both sides.

And then there is "const". I love "const" in C++. I don't have it in Java. But I have immutable classes there that I don't have in my C++ implementation.

All of this is a recipe for a great thumping headache.
Tags: c++, java, musings, work

  • Time to Rearrange

    I expect to hear back from the contractor on Monday and we'll discuss exactly how to fix things up in the kitchen. I don't think any of this will be…

  • Closer To Fine

    So the cabinets went in today, which is good. There are, sadly, two problems. First, there is a measurement glitch which resulted in the cabinets…

  • This and That

    Gretchen felt pretty lousy today in the wake of the COVID shot and spent most of the day huddled under a blanket on the couch. Neither kid ended up…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded