Tuesday, October 26, 2010

Random codeness

Been contemplating about a few things, that are arguably, the programmers equivalent to several mortal sins. One of these involves standardising my world around a given language setup. Yes, choosing the best tools for the job rather than the same tools can sometimes be troublesome.

The languages I'm considering, are C++ and C#. Python would be a good candidate except that I've waay to many lines of Python over the years lol. Behind the C++ factor, is simply put, Richard Gabriel was correct when he said "The good news is that in 1995 we will have a good operating system and programming language; the bad news is that they will be Unix and C++". Frankly programming in C++ is a bitch. It's not so much the language, which has plenty of warts, as it is building projects causes headaches. Most of which is a mixture of complexity and the inability of people to manage that complexity before shipping it. The other factor, being C#. I've come to rather like C#, because it takes the best part of languages like Java, i.e. using bytecode rather than native code, but unlike Java 6, C# 3 and up is actually a modern fucking language. Java can kiss my rebel dick. It's retarded.

C++ gives painless (as possible) support to C code, while adding some goodies: automatic ctor/dtor invocation, formal namespace schematics, semi-generic data structures, and often disabled or unused support for exceptions and runtime type information. There are also a lot of libraries written in C++, that are less than easy to use in other languages; the fact that many are often less than easy to use in C++, is aside from the point obviously ^_^.

C# is more convenient than C++, because of a more modern syntax (Java can really fuck a duck for all the modernness of it), and because it has the ultimate in language killers, which C++ lacks—A big fucking library. Where as C++ provides stream based I/O, container based data structures, and not much else beyond your systems C library. C# has a large cross-language class library, which essentially throws networking, XML, basic graphics on top of that, and a much more portable interface to system stuff, like Process class and the file system code.

That is the big killer: libraries that are easily incorporated. C++ lacks that. In fact, about the closest you can get is throwing in Boost, POCO, Qt, or Wx. Plus a few other odds and ends.

C# is a much more pleasant language to work in and takes the pain out of compiling projects, because it really can't get much harder than which defines to set and which files to compile into what. Something that life would be fucking great if C++ could say the same, even on a single platform group. Unlike Java, it's also possible to build C# projects promptly and trivially combine code with many other languages.

C++ however has a much wider range of libraries readily available without needing glue code, if one can stand the bitch and a half of making them work \o/.

No comments:

Post a Comment