Live data from Hacker News

Object Oriented Programming has Failed Us

blog.dmbcllc.com

11–20 of 49 posts

Re: Object Oriented Programming has Failed Us

#11

Hacker News Is Failing Us. This link is currently in the #2 position on the front page. I wonder if the people who up voted it actually read it or just agreed with the thesis?

Or, we are failing ourselves, but otherwise you are completely right. There is nothing in the article explaining why author thinks that "Object Oriented Programming has Failed Us".

Anyway, this is a good way to trick Hacker News:

1. Write curious title with some programming term in it. 2. Write some random thoughts in the article body mentioning the term. 3. Submit to HN 4. Traffic!

Re: Object Oriented Programming has Failed Us

#12

Object Orientation failed because it's too hard to understand? I blinked in incredulity. Object Orientation hasn't failed, but we're coming to appreciate its short comings as a sole design paradigm. For C programmers, C++ gave them access to variable execution via polymorphism (without ugly function pointers) and more flexible scoping via classes. In languages that provide first class and anonymous functions polymorp…

"closures provide better scoping flexibility than classes. Languages that have these features make it obvious how restrictive C++ is in binding this functionality in with the type system."

C++ can/does do anonymous functions (for example, see boost lambda), and can even give you most of what you want from first-class functions and closures (using functors). The parts that you don't get are due mostly to the fact that C++ doesn't have built-in garbage collection. It's a speed limitation, not a type-safety limitation.

Now for my rant: there seems to be a backlash against type safety in this forum that I don't understand. Granted, if all you ever do is develop dinky webapps with your best friends, permissive languages allow for rapid development (mostly because they let you get away with murder). However, once you have more than a few developers and a few tens of thousand lines of code, the benefits of strict typing become rapidly apparent. The chaotic, free-for-all mentality of languages like Ruby is great for rapid prototyping, but it kinda sucks for developing in more formal scenarios.

It may be "harder" to develop with strongly typed languages, but that's usually an indication that you're having to think a bit before you act. That's rarely a bad thing!

Re: Object Oriented Programming has Failed Us

#13
post #5

I don't think this article is particularly well-written. However, I do agree with the conclusion. For web-based programming, object oriented programming is simply ridiculous in all but a small number of cases. That's why the Lampshade framework I wrote is purely procedural, and why I'm able to write software on top of it so quickly. Client-side GUI programming is a different story, in my opinion. In general, just bec…

For web-based programming, object oriented programming is simply ridiculous in all but a small number of cases. Agreed. Functional programming seems to make a lot more sense. Fundamentally, isn't a web server just a function f: url -> html? Sure, databases and sessions complicate things, but even in these cases, functional structures seem a lot more elegant (in a mathematical sense) than OOP ones.

For any programming, OOP brings some advantages. What you might be decrying is over-the-top abuse of OOP patterns. Certainly, for most programming, abuse of design patterns is unwarranted.

However, taking, as an example, Ruby, which is both a functional and OOP language, the OOP features make the language a lot nicer.

Anyway, that article is completely daft. And I refuse to take any advice about programming from someone who spells "linear" as "linier". Shame there's no down-mod button.

Re: Object Oriented Programming has Failed Us

#14
post #4
post #2

Meanwhile, back at the lab, we need to come up with a programming environment that most people understand naturally. We need to do usability studies on the languages we develop just like we test applications we develop for users. Isn't that how Vista was designed? Wouldn't it be a better idea to have a really curious and imaginative person (an artist, if you will) work on the language that will last 100 years? On the…

It's also how Mac OS X, Windows XP, Windows 95, and most of their precursors were designed. There's just been an acceptance amongst OS designers that testing with real humans is the only way to know if things are actually easy. Programming languages are unique, however, in that the people building them are often also the users (and the more this is true, the better the language tends to be). C was designed to build U…

Ada has a pretty impressive record in safety critical systems; something that cannot be said of C. Aircraft software systems and many air traffic control systems in particular are all written in Ada.

Re: Object Oriented Programming has Failed Us

#15
post #14
post #4

Earlier quoted context omitted.

It's also how Mac OS X, Windows XP, Windows 95, and most of their precursors were designed. There's just been an acceptance amongst OS designers that testing with real humans is the only way to know if things are actually easy. Programming languages are unique, however, in that the people building them are often also the users (and the more this is true, the better the language tends to be). C was designed to build U…

Ada has a pretty impressive record in safety critical systems; something that cannot be said of C. Aircraft software systems and many air traffic control systems in particular are all written in Ada.

And yet, somehow, I've never seen a single line of live ADA code...and there are literally hundreds of millions of lines of C code doing work right now. Not only that, someone is almost certainly starting a new program written in C right now...and now...and now...and now. And...you, guessed it, now.

I'm sure Ada had a useful life, possibly even in a niche where C would never be an effective tool. I was just saying that design-by-committee, even with a lot of user input, is probably not the right way to build a timeless programming language, and that building a language while using the language probably is.

Re: Object Oriented Programming has Failed Us

#16
post #14

Earlier quoted context omitted.

Ada has a pretty impressive record in safety critical systems; something that cannot be said of C. Aircraft software systems and many air traffic control systems in particular are all written in Ada.

And yet, somehow, I've never seen a single line of live ADA code...and there are literally hundreds of millions of lines of C code doing work right now. Not only that, someone is almost certainly starting a new program written in C right now ...and now...and now...and now. And...you, guessed it, now. I'm sure Ada had a useful life, possibly even in a niche where C would never be an effective tool. I was just saying t…

Funny, I look at Ada every day ('cept it's called PL/SQL).

Re: Object Oriented Programming has Failed Us

#17
post #12

Object Orientation failed because it's too hard to understand? I blinked in incredulity. Object Orientation hasn't failed, but we're coming to appreciate its short comings as a sole design paradigm. For C programmers, C++ gave them access to variable execution via polymorphism (without ugly function pointers) and more flexible scoping via classes. In languages that provide first class and anonymous functions polymorp…

"closures provide better scoping flexibility than classes. Languages that have these features make it obvious how restrictive C++ is in binding this functionality in with the type system." C++ can/does do anonymous functions (for example, see boost lambda), and can even give you most of what you want from first-class functions and closures (using functors). The parts that you don't get are due mostly to the fact that…

Well templates do let you do just about everything being a meta-programming language - however libraries rarely use them and they are very complicated to implement yourself.

I've not found static typing to be a big productivity win. I think it disallows a small subset of bugs. Like most people I've been a C++ programmer because it was the highest performance language with the best support for operating and window systems. I'm gleefully looking forward to it playing a smaller and smaller part of my programming work.

Re: Object Oriented Programming has Failed Us

#18
post #12

Earlier quoted context omitted.

"closures provide better scoping flexibility than classes. Languages that have these features make it obvious how restrictive C++ is in binding this functionality in with the type system." C++ can/does do anonymous functions (for example, see boost lambda), and can even give you most of what you want from first-class functions and closures (using functors). The parts that you don't get are due mostly to the fact that…

Well templates do let you do just about everything being a meta-programming language - however libraries rarely use them and they are very complicated to implement yourself. I've not found static typing to be a big productivity win. I think it disallows a small subset of bugs. Like most people I've been a C++ programmer because it was the highest performance language with the best support for operating and window sys…

These strong-typing/weak-typing debates are the programmer's equivalent of skirt-length trends. The strong type system of C++ was a direct reaction to the deficiencies of the cast-happy, C-style of coding that came before; now we're back to dynamic typing. Ten years from now, after this generation of college grads has been burned while using the latest silver bullet for real projects, we'll be back to something more static. And around we go...

Anyone who experienced the C->C++ transition can tell horror stories about problems due to the (ab)use of C's type system in real code...and C wasn't even that weak! Even Perl coders have learned this lesson the hard way (hence the introduction of "use strict"). But I digress.

Maybe you're right, and strong typing doesn't matter that much for the new generation of apps. My instinct however, is that the current hipness of dynamic typing is a (somewhat justified) over-reaction to the ugliness of C++. Meanwhile, a lot of babies are being thrown out with a little bit of bathwater....

Re: Object Oriented Programming has Failed Us

#19
post #12

Object Orientation failed because it's too hard to understand? I blinked in incredulity. Object Orientation hasn't failed, but we're coming to appreciate its short comings as a sole design paradigm. For C programmers, C++ gave them access to variable execution via polymorphism (without ugly function pointers) and more flexible scoping via classes. In languages that provide first class and anonymous functions polymorp…

"closures provide better scoping flexibility than classes. Languages that have these features make it obvious how restrictive C++ is in binding this functionality in with the type system." C++ can/does do anonymous functions (for example, see boost lambda), and can even give you most of what you want from first-class functions and closures (using functors). The parts that you don't get are due mostly to the fact that…

"there seems to be a backlash against type safety in this forum"

You've said what I've been thinking for many months now.

We've also got a strong contingent of anti-MS ranters.

As to the merits of the article -- there are none. Oddly enough, I can't make a case against his argument because he doesn't have one, save his ultimate realization that it was the language itself. "It came to me in a dream" is a very difficult thing to take issue with.

Re: Object Oriented Programming has Failed Us

#20
post #18

Earlier quoted context omitted.

Well templates do let you do just about everything being a meta-programming language - however libraries rarely use them and they are very complicated to implement yourself. I've not found static typing to be a big productivity win. I think it disallows a small subset of bugs. Like most people I've been a C++ programmer because it was the highest performance language with the best support for operating and window sys…

These strong-typing/weak-typing debates are the programmer's equivalent of skirt-length trends. The strong type system of C++ was a direct reaction to the deficiencies of the cast-happy, C-style of coding that came before; now we're back to dynamic typing. Ten years from now, after this generation of college grads has been burned while using the latest silver bullet for real projects, we'll be back to something more…

Wasn't really my point, I just took the diversion to talk about static typing. If static typing comes back as the thing I think C++ will still be crap. I think the productivity gains in the language I mentioned have everything to do with built in list types, first class functions, closures and anonymous functions. Good libraries built on those things help a lot as well.
Post reply on HN