fastnumbers icon indicating copy to clipboard operation
fastnumbers copied to clipboard

Re-write using C++ and pybind11

Open SethMMorton opened this issue 4 years ago • 0 comments

While attempting #37 I ran into some troubles with how cumbersome changing things was. Maintenance has become a problem. This is mostly because the code is written in pure C.

When fastnumbers was started, the landscape of packaging and distributing extensions was much poorer than it is today. There were no wheels. Extensions basically had to be compiled by the user when installed every time. I wanted to minimize potential troubles for the user so I chose to write in pure C using the raw Python API. C compilers are more likely to be installed, and compilation typically takes less time than C++. I had considered Cython, but at the time there was no way to define build-time dependencies so users would face problems if they had not pre-installed it on their machine before installing fastnumbers.

Today, things look much better. With the advent of wheels, it basically makes no difference what language or framework I choose. C++ is far more expressive than C, and with templates and OOP I can reduce the maintenance burden. Doing this will make it easier to address problems going forward.

SethMMorton avatar Nov 23 '20 03:11 SethMMorton