Our Articles

Integrating a C# Library into Python: Wrapping vs Code Conversion

Developers may encounter situations where they already have a well-established and tested C# library that performs its functions excellently. However, their clients work in a Python environment and need access to the functionality of this library. In such cases, developers need to find ways to integrate, making the C# library accessible for use in Python.
link

28 November 2024

C# to C++ Translation Challenges and How We Plan to Enhance the Code Translator

Creating an efficient code translator between languages such as C# and C++ is a complex task. During the development of the CodePorting.Translator Cs2Cpp tool, we encountered numerous challenges related to the differences in syntax, semantics, and programming paradigms of these two languages. This article will discuss the key difficulties we faced and possible ways to overcome them.
link

22 November 2024

Comparing Rule-Based and AI Methods for Code Conversion – Part 2

AI code translation represents an innovative approach that significantly simplifies the process of converting program code from one language to another. Generative AI models are capable of not only automatically transforming the syntax and semantics of the code but also optimizing it, taking into account the specific features of the target platform and performance requirements.
link

02 October 2024

Comparing Rule-Based and AI Methods for Code Conversion – Part 1

With the rapid development of technology and the emergence of new programming languages, code translation is becoming increasingly important. Translation tools simplify and accelerate project migration, helping developers adapt products for various languages, thereby expanding their market potential. This article compares rule-based and AI-driven methods for code conversion, examining their effectiveness, accuracy, and practical applications.
link

20 September 2024

Rules for Translating Code from C# to C++: Object Creation and Method Calls

Sometimes the behavior of code written in C# and C++ can differ. Let's take a closer look at how CodePorting.Translator Cs2Cpp handles such differences and ensures the correctness of the code translation. We will also learn how the conversion of unit tests is carried out.
link

27 March 2024

Rules for Translating Code from C# to C++: Class Members and Control Structures

In this article, we will explore how our translator converts class members, variables, fields, operators, and C# control structures. We will also touch on the use of the translator support library for the correct conversion of .NET Framework types into C++.
link

22 March 2024

How to Improve Java Code Quality When Using Our Translator

We are going to talk about approaches and language constructs in C#: which are good to use and which are not good. Of course, under good or not good we consider the following: how readable and maintainable will be resulting Java code after translation from C#.
link

15 March 2024

Rules for Translating Code from C# to C++: Basics

Let's discuss how our translator converts syntactic constructs from the C# language to C++. We'll explore the translation specifics and the limitations that arise during this process.
link

11 March 2024

C# to Java Translation – Using .NET Framework Logic in Java Environment

Translation of some projects from one language to another is not only about source code changes, but also about the environment, in which we execute that project. CodePorting.Translator Java Class Library does implement such environment over JCL (Java class library), keeping logic and structure of .NET Framework class library, that makes a translated project feel self at home, hiding it from Java platform implementation.
link

28 February 2024

C# to C++ Translator: Operations on the Source Code

At first glance, it may seem that the translator has only one way of using it: by feeding it C# code, we expect to get equivalent C++ code as output. Indeed, this way is the most common, but far from the only one. This article describes other modes provided by the code translation framework and related utilities.
link

15 February 2024

From C# to C++: How We Have Automated Project Conversion – Part 2

The design and development of C# to C++ code translator was performed solely by CodePorting. It required many investigations, applying multiple approaches, and tests, differing by memory model and other aspects. In the end, two solutions were chosen. One of them is currently being used for C++ releases of Aspose products.
link

26 January 2024

From C# to C++: How We Have Automated Project Conversion – Part 1

Customers value Aspose products, that allow manipulating protocols and files of popular formats. Most of them were initially developed for .NET. At the same time, business applications for file formats, run in different environments. This article will describe how we have succeeded in setting up the releases of Aspose products for C++, by building a framework for code translation from C#. Keeping the functionality of .NET versions for these products was technically challenging.
link

18 December 2023