WATCOM C++ RETRO-COMPARATOR UPGRADED

Developer Nacho Mellado took up the task of modernization the 28-year-old compiler C ++, Watcom C ++ 32 versions of 11.0 dated 1996 released by Sybase Inc., adding exceptions for processing exceptions-functionality that officially appeared in the C ++ language only two years later with the advent of the first standard C ++.

In 1998, Mellado, along with colleagues, presented the darkring library (TDL) – an advanced library for processing graphics and audio in real time mainly targeted towards DOS games and projects in the spirit of Demoscene. At that time, the Watcom project was already ahead of its time, but lacked support for exceptions.

Years later, Mellado returned to work on the library, which primarily used assembly language for real-time processing, and started integrating C ++ for faster integration. However, this change resulted in excess codes due to comprehensive error checks.

Mellado observed that using templates for error handling based on the principle of “do this fail gracefully” could be simplified significantly by incorporating exceptions and utilizing the RAII pattern (resource acquisition is initialization), enabling the program to handle non-critical errors correctly. Despite implementing RAII classes that ignored errors, the exceptions he created were not caught anywhere in the program.

Although the Watcom compiler could compile the Try, Catch, and Throw constructs, the generated code relied on hooks that were not present in any compiler-supplied library. The search for a solution on retro forums related to the project yielded no results, indicating that the Sybase team began implementing exception support but never completed it.

Without any documentation, Mellado essentially worked blindly. He attempted to reverse engineer the compiler, creating numerous programs, disassembling generated binary files, and formulating hypotheses until he fully comprehended and could explain all binary files associated with the project.

Mellado’s enhancements in the compilers enabled encoding hooks and realizing exceptions, significantly improving code clarity and efficiency. With exceptions, the previously bulky and error-prone RAII code became more concise and reliable.

The platform encapsulates all operations in an external Try-Catch block, autom

/Reports, release notes, official announcements.