Fog Creek Software
Discussion Board




About the impedance mismatch article

IMO, the article starts with a arguable premise : "Since a huge percentage of code requires access to databases". A huge percentage of code *in business applications* requires DBMS access, that's true; but fortunately, there are interesting areas in software development which are not enterprise applications.

I do 3D and graphics, and I don't feel the right to complain because general purpose languages lack built-in support for vectors and matrices. Why should *general purpose* languages favor DBMS access over 3D math?

Gabriel
Tuesday, March 30, 2004

Well, I program in DirectX every day, and I use a database (albeit custom).  DB access is horizontal


Tuesday, March 30, 2004

Exactly.  The relational model is a *general* model of data.  Any data you can create and store can fit in a RDBMS (in OpenGL, that could be vertex lists, or quadratic objects, or lights, etc.).

MR
Tuesday, March 30, 2004

Database access built into the language would be a horrible idea for a general purpose language. It's a little like making freon compressor pumps standard features on internal combustion engines-an ugly burden to put on a motorcycle, even if it makes good sense for sedans.

There are languages that are intended specifically for database applications, and they tend to include database access in the language. The Progress 4GL gives very logical and immediate access to the database. It's really great for writing enterprise applications. Database selection syntax is identical to program logical syntax, and database fields and tables are just another type of variable. It's a complete waste for writing anything that isn't a database application.

I'd be pretty pissed if my C++ compiler built database access into the language. I may do quite a bit of database work in C++, but I do a lot of other things with the language as well. Things that benefit by being fast and light, that don't need the database.

So don't put an air conditioner on my motorcycle please.

clay Dowling
Tuesday, March 30, 2004

"I do 3D and graphics, and I don't feel the right to complain because general purpose languages lack built-in support for vectors and matrices."

You may not feel right complaining, but it may also be that special purpose languages with such support would increase your productivity significantly.  Similarly, having regular expressions built into Perl is wonderful.  They're clunkier in Python, which uses a library for regular expression support.

Junkster
Tuesday, March 30, 2004

All the work to solve this problem so far have been doing the same thing. "Yes, there is an impedance mismatch, now, let's match'em".  The attitude is the same a "Yes, perpetual machine doesn't exist, now, let's make one". No wonder all of them have failed. I am sorry to see Joel fell into this too.

The mismatch between OO and relational is deep in the philosophy. They are different way to view the world. You can not "map" one to the other. Just like you can not "map" a plane to a truck. Even you chop off all the wings and toll the plane onto the highway, it still can not behave like a truck.

Why can't we just accept the fact that there is an impedance mismatch? Stop trying to put one on top of the other. Let them stand side by side.

Siyan
Tuesday, March 30, 2004

Agreed Siyan, let the problem exist.

I am a SQL Developer today.  Basically, I function as a data architect but the majority of my job is spent writing stored procedures and views for the backend of our new applications.  I don't claim to be a good ASP guy but I am pretty good SQL guy.  My ASP developers write code that call the procedures and I return them the results or take their arguments and transform it into set-based SQL statements.  In actuality they write ZERO code against database tables.  They call procedures and send parameters or XML and that is all.  They do not even have to know the data model if the don't want because everything down to the smallest detail is wrapped in procedures.  They stick to what they do best (writing the front end) and I stick to what I do best (making the back end hum).  Languages should follow the same concepts; let SQL take care of your database and let C++, ASP, (insert language here), to take care of everything else.

Grant Case
Wednesday, March 31, 2004

Junkster : I agree, but the problem lies in that Joel was talking about general purpose languages, not special purpose one. I think neither RDBMS access nor 3D math have a place in a general purpose language.

Gabriel
Wednesday, March 31, 2004

The great triangle of communication is email, web, and glue.. or as most companies call it.. groupware.. or as any netizen would recognize it.. P2P/social communities/wikis... we need to recognize these three infrastructure (although completely heterogeneous at the moment) as first class citizens for a real world language that works daily with these three mediums. It is an unsual day when I wrote a software that doesn't utilize the web, email, or some kinda collaboration related needs, just as unusual as it is not to touch a db. So let's get these guys on the same boat and work towards making them first class citizens in programming languages and core libraries.

Li-fan Chen
Wednesday, March 31, 2004

*  Recent Topics

*  Fog Creek Home