Porting to a different language

Forums: 

I know it probably won't happen, or at least not for a long time, but have you ever thought about porting it to a different language, like C or C++?

Yes. Years before I wrote BleachBit I wrote another cross-platform, desktop application using C++ and wxWidgets. This creates a more native look and feel on Windows (and other platforms like Mac), and it is easier to make a smaller installer package.

However, it takes more time to write code for C/C++ than with Python, so for a fixed amount of development time, there are fewer features.

Based on the principle that function is more, a rewrite is not likely.

---
Andrew, lead developer

ROCKNROLLKID's picture

Yes, I figured. Python is good, simple, and fast language. You can Python in half the time it would take to master C++. Of course, python is also a sloppy language and lacks functionality and features you would only see in C/C++. I guess it doesn't matter, but I figured it would give you something to think about in the distant future.

____________________
Also known as Alex.

Moderator for BleachBit and a maintainer for Winapp2.

Check out my open-source group on Steam: http://steamcommunity.com/groups/opencommunity

Windows 10 x64 (switching to ReactOS in the future).

Hmm, I am not sure what C/C++ features are missing in Python. It seems to be the other way around. Python's motto is "batteries included," and it comes with a good set of features. For example, BleachBit uses a lot of native features in Python for XML processing, JSON, unit testing. Many other features can easily be added through Python modules, which are easy to install, like through PIP.

Python can also be used to call C/C++ APIs, like I am doing in Windows for the recycling bin.

Python is dynamically typed, and when used improperly, this can lead to errors, but so far this has not been an issue for BleachBit. It is something I am aware of, and assertions and unit tests are some methods to avoid these kinds of errors.

---
Andrew, lead developer

ROCKNROLLKID's picture

I have thought about learning python, but never found the time to master it. Coding isn't exactly my chosen path. Maybe one day, I will attempt it.

____________________
Also known as Alex.

Moderator for BleachBit and a maintainer for Winapp2.

Check out my open-source group on Steam: http://steamcommunity.com/groups/opencommunity

Windows 10 x64 (switching to ReactOS in the future).

Maybe it is not for everyone, but for me it is a combination of an endless puzzle, a science lab, and a hobby like a train set.

---
Andrew, lead developer

ROCKNROLLKID's picture

Do you have plans on porting it to a newer python version, like v3 or something? I noticed you are using python 2.7, which is fine, but I plan on studying v3 python.

____________________
Also known as Alex.

Moderator for BleachBit and a maintainer for Winapp2.

Check out my open-source group on Steam: http://steamcommunity.com/groups/opencommunity

Windows 10 x64 (switching to ReactOS in the future).

Yes. Maël Lavault has contributed a lot of code (in a separate branch in Git) to update BleachBit from GTK version 2 to GTK 3, though it needs some polishing, especially for Windows.

Once this GTK modernization is done, I would like to modernize Python too.

---
Andrew, lead developer