[prev] [thread] [next] [lurker] [Date index for 2005/04/23]
> > 3. The implementation language is tightly bound into the API. Components > > communicate through APIs that are written in terms of C++ classes and > > objects. > No worse than all the bits of Unix API that are defined in terms of C > structs. You may occasionally have to write a bit of test code with offsetof and sizeof to be sure you know what's going on... but at least the actual elements can easily be rendered down to hardware types and in most cases you can automate the conversion. And if you really want to write a wrapper anyway, C is a pretty small and simple language to interface to (see below), and because all the stuff in the structs are primitives your C wrapper is a handful of assigns. Try THAT in C++. I don't know, I've written code in Forth on lots of systems, and in every one I had to build native structures and system calls out of Forth primitives which are pretty damn primitive... and UNIX has been nowhere near the worst API to deal with. In fact for RSX-11/M, which DOES define all its structures in terms of well defined assembly code, I finally gave up trying to read a text file from Forth and let Fortran be my wrapper there. And let me tell you, if you think a C wrapper is a pain, try a Fortran one. > mktime mktime(3) is not a system call. > Or look at gettimeofday, one argument to which is a struct containing > two longs. Now I have to guess whether long == int, or whether long is > twice as big as an int - because the size of 'long' isn't defined anywhere! Yes, I remember hating the fact that they decided to wimp out and NOT make long 64 bits on the VAX in 1980. But you only have to learn that once for an implementation, and I've found that there's about 20 important calls and as many structures that you REALLY have to have down before you can build real useful code on UNIX. > > Imagine if we were routinely putting more metadata in the file > > system rather than in things like magic numbers and structured > > files. > Mmmm, structured files. I wonder how those structures would be defined. Well, I like the Electronic Arts/Amiga Interchange File Format.There's stuff above here
Generated at 01:00 on 03 May 2005 by mariachi 0.52