You could very easily go crazy with smart pointers. It seems like the safe idea, until you realize that you could be tying up memory everywhere. Perhaps you handle them carefully to avoid that issue. A more pressing problem is the mess of code they require to use them, such as is the case if you template your smart pointer class. Even if you are ok with that, your compiler might not be. GCC, for example, has a bug that won’t let you nest templates within each other. Usually you have to create some sort of wrapper class around a template. That makes accessing the data even more tedious.
Tag: programming languages
Maybe I need an exception block for my header.
There’s a bit of disagreement over what is an “interpreted language” and what is a “compiled language”. Technically, you would think that any language that can be interpreted by a virtual machine can also be compiled even if with great difficulty. I can’t speak for every language out there, and I haven’t gone over all the considerations to come to any sort of definitive conclusion about the matter, but I am inclined to think that it is possible to invent a programming language that cannot be run as native code.
I like languages. Latin, German, French, and more recently devoted to Japanese. Programming languages are my favorite however. They are so powerful: the perfect tools for creativity and symbolic expression. Beautiful code is like a well-written poem: Short, simple, efficient, but clearly understandable to someone even moderately acquainted with the words and grammar.
Tossing Goldfish aside at version 8.2.2, I tried again, this time resorting to a much more object-oriented approach. After pouring lots of work into that, I realized my paradigms were too willy-nilly and my memory management system was not going to work. I abandoned this as Goldfish 10 and tried to forget about creating a programming language… ever again.
A deep-felt desire never dies. Within a few years and armed with an extensive amount of experience, I was back to contemplating the idea again. I wrote my ideas down in several small text files scattered around my computer. The clockwork in my head just wouldn’t quit processing this problem.
Eventually, I discovered (or rather, rediscovered) Rust, which fulfilled many of the ideas that I learned would work. I was elated, but that was short-lived. For one thing, the paradigms that Rust requires for safe programming would greatly limit my power as a programmer. For the things I wanted to do, I needed pointers, as much as I hate them, and trying to use them in Rust would have been very difficult. More importantly, Rust was compiled, and therefore could not be embedded. While you can certainly mix Rust with other languages, it isn’t as easy as I’d like. Thirdly, Rust is verbose, and not in a more readable way like Java. There is no prettier language than Java to me (notable bias from me working with C++ most of the time), but admittedly, Rust is not as bad as it could be.
With Rust scratched from contention, the only other language I wanted to turn to was Python. To say Python is awesome sounds like an understatement to a fan like me, but it does have some notable design shortcomings, even now that Python 2.7 has Unicode support. For one, there is the horrible null value (known simply as “None”). Such a value has been called the “billion dollar mistake” (referring to its presence in Java, but it’s the same issue), and while it persists in many languages (except Rust) in different names (“null”, “nil”, “none”, etc.), it is still a problem that leads to security holes. Furthermore, working with C code requires dealing with raw memory allocation. I could handle references safely in C++, but integrating Python with C++ is anything but convenient.
Despite the years of setbacks (but excellent learning experiences) and the incredible challenge of writing everything from scratch AGAIN (and linking it up with existing engines and writing hooks for interaction with other languages and writing documentation and… and… and…), I just can’t seem to step away from this dream. So, I’m trying again. At the very least, I’m going to get some blog articles out of this!! Fortunately for you, my reader, I actually have several things written down and quite a bit already coded up.