2014-1-30: Old software...

2014-1-30: Going through old projects, compiler stuff, updating code

Eiffel

In looking through some old projects I wanted to compile an X11 program that I made using SmallEiffel (which was later renamed to SmartEiffel). It's a nice graphical demo so I wanted to get it running for fun.

SmallEiffel used to be useful but it's way too much effort to get anything I made long ago work with a recent compiler. Also SmartEiffel is dead, so that means switching. I'd need to switch to libertyeiffel or Eiffelstudio, but for some reason the last one doesn't work on my PC. libertyeiffel uses non portable stuff and for some reason requires gccxml... I don't see that as a port in FreeBSD, allright, then not. Eiffel is passe...

I had some nice programs working in SmallEiffel including a simple but useful X11 toolkit with text boxes, lines around it with text description, buttons and much more, a graphical demo and some board games. But it's easier to just rewrite them in C.

C++

I've updated various programs from the 1990s in C and C++. C++ was a huge nuisance some time in 2009 when I was updating a still fairly limited size program, and C++ is a pretty poor language anway, with all the weaknesses of C and almost no redeeming qualities, so I'm not considering using that seriously.

C

C was least problematic in updating older programs. The issues in old C code were mostly to do with changing header files (e.g. for malloc/free), and I remember long ago (ca. 1997) already network code (well, the structures etc.) had changed a lot from several years earlier.

Next...

I'm thinking about what compiled language to use in future for my own projects...

C is useful, but also annoying. To make C work such that you don't need to reorganise your source code after a while, you need to be very rigorous in your work ethic, i.e. deciding what to keep within which C source file and what to export in a header, otherwise the program will become an unreadable mess. But C is fairly easy to get something working in, especially with Clang's usually useful error messages (exception: I recently found, at least in Clang 3.3, perhaps fixed in later versions: If there is an undefined variable/define the compiler suddenly asks for the current operation to be finished so e.g. if VERSION is not defined, then printf(PROGRAM " version " VERSION); will give an error about an expected end bracket ')' at the place of VERSION, instead of saying that VERSION is something undefined).

Perhaps Ada? At least it's more rigorous than C.


Last modified: Mon Feb 3 00:22:01 CET 2014