Monthly Archives: July 2012

A few consequences

The last few posts introduced some major changes. Let’s see what fun consequences they might have. Global functions By using the factory functions in classes, we can simulate global functions. One in particular stands out: main. I never had a … Continue reading

Posted in sool | Leave a comment

Selfless vs. selfish and the return of the constructor

A thing came to my mind while writing this about functors. When a class defines a selfless method, object Class selfless no_self() end end it can be called either without an object: Class:no_self() or with one: local instance = Class … Continue reading

Posted in sool | Leave a comment

The expressive power of templates

The current state of things is: interfaces are sets of method prototypes. A class is said to comply with an interface if it implements all the interface’s methods. declaring an interface also creates a so called “generic” class. This generic … Continue reading

Posted in sool | Leave a comment

Syntactic sugar and namespaces

I’ve been playing around more seriously with D lately, and learned a few interesting things about it. By using it in an actual (small) program, I was forced to learn it more thoroughly, and many details that had escaped me … Continue reading

Posted in sool | Leave a comment

Of precision and orders of magnitude

Often in gamedev channels we get questions about what types to use for what kind of data, and most of the time it comes down to “is it going to be precise enough?” In particular, Lua has a single number … Continue reading

Posted in Uncategorized | Leave a comment