Tag: programming

When To Use Smart Pointers

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.

Continue reading “When To Use Smart Pointers”

Float math extension

For no other reason that it being the first to come to mind, I implemented a small floating-decimal numbers extension (as opposed to integers). Implementing it was helped me realize what the current virtual machine still lacks and how it can be better implemented.

Continue reading “Float math extension”

#exclude stdlib

It is rather nice to have a standard library. However, for standalone applications on bizarre platforms (i.e. thous shalt be cross-platform), a language should work independent of libraries but not conflict with them. Part of the reason is to allow embedding. It’s nice to not have large dependencies, especially when you can avoid them. At the same time, it’s nice to give users the option to use Boost or some other peculiar library for handling the heavy lifting.

Continue reading “#exclude stdlib”

Notes on Security within an interpreted language

Are you creating a programming language? Wouldn’t you like it to be secure?

Disclaimer: I am not a security expert, not even remotely, but I have read about security and viruses and I can imagine various ways people might take advantage of this sort of system. Furthermore, since you ultimately decide the language with which you will create an interpreter, I expect you to make yourself aware of best programming practices within that language, and consequently, I won’t cover such information here.

Continue reading “Notes on Security within an interpreted language”