i said: > no typechecking. and this is the part that really bugs me. endless use of void*; if you get it wrong, who knows what'll happen. the compiler certainly can't help.
under the interfaces i was looking at in macos x, most things are accessed through a trio of calls along the lines of: find out the size of data stored for a property: OSStatus AudioHardwareGetPropertyInfo(AudioHardwarePropertyID inPropertyID, UInt32 *outSize, Boolean *outWritable); get the data for a property: OSStatus AudioHardwareGetProperty(AudioHardwarePropertyID inPropertyID, UInt32 *ioPropertyDataSize, void *outPropertyData); set the data for a property: OSStatus AudioHardwareSetProperty(AudioHardwarePropertyID inPropertyID, UInt32 inPropertyDataSize, void *inPropertyData); where a tag might be, for example, kAudioUnitProperty_SetRenderCallback. IMHO this is the logical extension of the ioctl-is-comfortable school of programming. there are thousands of property tags, each with their own argument type (often undocumented) and implied semantics (often under-documented). it's incredibly clunky and error-prone to program, and i'd imagine it's a nightmare to maintain. a piece of code that, if the interface was right, could be just one element of an expression, takes about 7 lines of brittle code sorry about the off-topic rant, but perhaps it's useful to compare the two approaches.
