Possible Weekend Projects
- node / ncurses based text editor
- node cluster enabled http-server
- node mud server
- C based Forth implementation using Flex.
Is C++ Worth The Trouble?
I’ve been trying to decide if it makes sense to invest the time to learn C++ relative to the other C based languages I’m focusing on.
If I merely want Objects or collections, maybe it makes more sense to go to Java/C# than C++? But the advantage of C++ is that you get fast template generated collections with pointer semantics. However, maybe collections in Java/C# can simply be treated as arrays, which is not too far off in capabilities.
The coming changes in C++11 are enough that I’m having a hard time considering the extra cognitive load of keeping C++ straight as it diverges more and more from C.
So I guess the question is, can I use a smaller consistent subset of C++ that is useful to me, without hitting the dark corners of C++?
Things that C++ provides that I like:
- Qt toolkit is a good cross-platform toolkit for GUIs and other system components
- Templates and STL allow performant code without having to code datastructures myself.
Are those enough to justify moving from C to C++?
I could use Tk instead of Qt from C. It’s possibly not as crisp as Qt, but equally cross-platform and Tcl is full of useful utility functions.
Assembling 32-bit ASM on 64-bit Ubuntu
as --32 <source-file> -o <object-file> ld -m elf_i386 <object-file> -o <executable>
This might be a little long in the tooth now, but it was a site that I thought did a pretty decent job teaching C++ and basic Windows programming a while back.
I believe the author has moved onto dealing with the D programming language these days (and some Haskell).
I’m trying to go through the WinAPI tutorial again, but the current Visual C++ 2010 Express isn’t liking some of the code (maybe I’ve got typos, I’m not sure).
It may be simpler for me to see if Charles Petzold’s Programming Windows has an initial test program.
Object Based C++ (C using Classes)
I wonder if it’s worth just using C++ as a C that can manipulate objects. Under that paradigm in general one wouldn’t create many new classes, but would simply use those already provided by the standard library or other 3rd party libraries. All the code created by the programmer would be essentially C style procedural / functionally composed code except that it could utilize the methods of objects and take advantage of the data structures in the STL.
I’m not sure that I would completely avoid defining new classes in this paradigm, but I would save them for the few new datatypes that were actually necessary and couldn’t be emulated using the already available data structures.