Python Versus Other Programming Languages
Programming in areas such as multi-threading, multi-processing and networking is perhaps the more traditional domain of systems languages such as C, C++ and Go. The reasons for porting the original work on ansar from C/C++ to Python are covered in the following paragraphs.
General Language Considerations
Debates over which programming language is best suited to a task can quickly turn into the different parties advocating for their personal favourite. There is wide variation in syntax, execution model and data type system across the languages available today, and the result of comparisons can be a creeping sense of “apples and oranges”.
There are also broader issues such as the quality of development tools, compilation speed and runtime performance. Beyond that there is the availablity across development and target platforms. Selection of a programming language based on a preferred syntax can be sideswiped by the lack of any tools for a customer’s target platform.
Ultimate Goals Of Ansar
The ultimate goals of ansar include network messaging and distributed computing. With this in mind, development of ansar was moved to Python.
There is a need to reach as many developers and as many projects as possible. A networking development solution that is only available to developers using C++ on VS Code on Windows is a severely limited solution. Extending the reach of that solution requires another toolset with another build chain and another distribution package. To call itself a “widely available” networking solution, would require a dedicated community of developers maintaining multiple build chains.
Python is a well tested and well liked language. There is also good tooling for editing and debugging of code and effective packaging and distribution. The “reach” of Python is only challenged by C# and the CLR. Attempting to compete with Python on this same metric with a language like C++ is unrealistic.
The adoption of Python for ansar was a strategic engineering decision rather than a vote for one language over another. It has proved to be a nice, productive language to work with.