The joys of for each

May 31st, 2006

One advantage of writing my own interpreter is the ability to add new features to the language. I have taken quite a bit of inspiration from other languages I have used, such as C++ and python.

If you have used collections in Active4D, you may have used for each to iterate through a collection. Starting with v4.0, for each can be used to iterate through much more than collections. Read the rest of this entry »

More concise coding: using the “in” operator

May 4th, 2006

I was coding the other day and wrote these kinds of tests for the millionth time:

if (position("foo"; $bar) > 0)
if (find in array($bar; "foo") > 0)
if (collection has($bar; "foo"))
if ($bar{"foo"} # "")

So I said to myself, “Self, there has got to be a better and faster way to do these tests.” Read the rest of this entry »

Howdy

May 3rd, 2006

The whole rest of the world (under the age of 25) seems to have a blog, so I figured it was time for me to start one as well.