31 Jan 2010
XMLLists. What the fuck: from the documentation,
The XMLList class contains methods for working with one or more XML elements. An XMLList object can represent one or more XML objects or elements (including multiple nodes or attributes), so you can call methods on the elements as a group or on the individual elements in the collection.
If an XMLList object has only one XML element, you can use the XML class methods on the XMLList object directly. In the following example, example.two is an XMLList object of length 1, so you can call any XML method on it.
Which is great, if I don’t care about properly typing my variables.
TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@1f51a779 to XML.
And of course there’s no builtin way to convert a length-of-one XMLList into a normal XML object. Have to resort to the ugly (but simple)
var xml:XML = new XML(bullshitXMLList.toXMLString());
And really. Why wouldn’t XMLList inherit from XML? Seriously?
28 Jan 2010
It supports associative arrays, which is great, but they’re broken: the length of an associative array is 0. This is because, as far as I can see, length is just a normal property that’s updated when you call foo[n]. But it’s just fucking ignored if you call foo[string].
Hell, the documentation even says as much, but seriously?
There is no advantage in using the Array constructor to create an associative array. You cannot use the Array.length property or any of the methods of the Array class with associative arrays, even if you use the Array constructor or the Array data type. The use of the Array constructor is best left for the creation of indexed arrays.
Why even write that? As soon as the words hit the screen, you’d think someone would say, “this is bullshit. what the fuck were we thinking?” and file a bug. There’s even a stack overflow thread on how to find the length of an associative array. How is this not built in?
22 Oct 2009
In the course of this paper, I will try to solve the problem of evil. Specifically, I will address one of the “Further Questions” at the end of Robert Merrihew Adams’s article, Must God Create the Best on page 327 of our textbook, The Experience of Philosophy. The question is this:
The problem of evil is often stated in some way such as this: If there were an all-powerful being, then that being could prevent evil. If there were a being who was perfectly good, that being would prevent evil if that being could. Evil exists. Therefore, no being is all-powerful and perfectly good. Has Adams answered this argument? Explain.
More …