in reply to Re^2: Paul Graham on Great Hackers
in thread Paul Graham on Great Hackers

When i say one big string i mean that it would appear to be a scalar/string to the programmer, not that it is implemented as a big string. The same could indeed go for a socket for that matter.

edit: Not a database table, which has an inherent structure. Perhaps that'd be an array of arrays.

I'm talking only about the interface to the file/socket. You could concatenate something to a string which would write it to a socket.

Replies are listed 'Best First'.
Re^4: Paul Graham on Great Hackers
by jdporter (Paladin) on Jul 30, 2004 at 12:49 UTC
    Why is that better? I think about the typical operations (methods) that are pertinent for strings, and I don't see how they fit on a database. So length gives me a count of the total bytes in the database. Why do I care? If I parse this database "string" on, say, ';', the chunks I get are meaningless. No, mapping a String abstraction onto a file or database is (in general, I'm saying) a complete failure.
Re^4: Paul Graham on Great Hackers
by diotalevi (Canon) on Jul 30, 2004 at 17:20 UTC
    A hash of arrays would be more appropriate assuming you mean a typical RDBMS-ish system. There is no order to the rows in a table and you'd violate that by providing an array. Maybe if we had an array with no order then you could say that.
      And of course there's DB_File (and MLDBM) where you can tie a hash to a database (though not a RDBMS or SQL). How's that for abstraction?