Skip to content

C++ migration #262

@LecrisUT

Description

@LecrisUT

Actually I've never asked. Are you guys comfortable with C++, and at what level? E.g.:

  • Given a reimplementation, are you able to maintain it?
  • Are you comfortable with class, smart pointer, and/or templating design? Would you want to learn through this process?

Thankfully it is possible to make gradual transitions for this, while keeping the C-api intact. In a nutshell, I would do it by making a C++ interface that calls the C interface, and then gradually make translations from one to the other in no particular order.

Main benefits that we can get:

  • better memory management with less memory leaks
  • better bindings since the intent and lifetime of the pointers can be passed to the other api
  • thread safety
  • simpler design through classes
  • namespaces and simpler namings
  • micro-optimization. Yes this is a negative, but the design exercise could be beneficial for other things down the line

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Issue and PR

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions