From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2c45af7b985c5fcc1e3bcf51edbbd9e4@mightycheese.com> To: 9fans@cse.psu.edu Subject: RE: [9fans] g++ From: "rob pike, esq." In-Reply-To: <81132473206F3A46A72BD6116E1A06AE479C66@black.aprote.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Sun, 14 Sep 2003 09:13:14 -0700 Topicbox-Message-UUID: 34d21884-eacc-11e9-9e20-41e7f4b1d025 > There appears to be some nasty law of physics at work here: the simple and > elegant O-O languages are easy to use right, but at the same time lack the > single biggest trump of O-O -- generics; while the languages that contain > generics are cumbersome and ugly. Go figure. i agree. o-o is so easy to do by hand in the few cases it really contributes to the design of software that it seems unimportant to have languages centered on it, yet polymorphism is a genuine boon but implementing it using o-o so difficult you get monstrosities like the STL or lose all compile-time type safety, as with all the casting through Object in Java. don't know much about the generics in the new Java but i've heard a lot of grumbling, so i don't hold out much hope. but here's the bad news: within this state of affairs, we see o-o being accepted as the foundation of good design and we educate our students in that point of view. o-o has its moments, but using it well is very difficult. i think the pattern book is the test that proves the rule; if that's the best you can say, your apprach is wrong. o-o is clumsy, a big hammer that is only occasionally the right tool. when all you have in your hand is the o-o hammer, everything is a thumb. how did we get here? i despair. -rob