But every block also has a name. This is used by eg. NEI to find it. so why not create an API that allows access to block and item types in a way like this.
local itemType = turtle.getItemType() if itemType == item.iron then ...
You could also say item["iron"]. This could be used as a base for working with all kinds of blocks and items. NEI even recognizes items only identified by their damage value, like colored wool or industrialcraft/redpower items. (Yes, NEI needs a plugin for redpower, but CC already has some redpower interop code)
Such an API could be a base for more extended peripherals, like eg. an programmable item filter or automated crafting table.











