3 ms·
Object orientation works because it worked for windows (and other UI toolkits, even today) when computers were switching to graphical user interface toolkits. A
by waps 12y ago
Object orientation works because it worked for windows (and other UI toolkits, even today) when computers were switching to graphical user interface toolkits. And frankly, object-oriented UI toolkits work a lot better than webdev even today.
But OO doesn't work because webbrowsers have detonated a hydrogen bomb of "historic reasons for this API" over the worst UI toolkit ever, and abstractions, whether OO or ..., simply don't work well over this. They make it extremely hard to find where the OO toolkit is incompatible with vendor X's browser version 82.2.1.3.3.883.1.3.4, and harder yet to fix the problem.
It seems like 2014 was the year of having programmers rant against every form of abstraction because they can be misused and because they "hide complexity". Well of course they hide complexity. That's the point. That's what allows us to raise the abstraction level of what we're doing and working on.
A simple shared networked database (also known as CRUD, or to some extent MVP) was a solved problem on NextSTEP before I left kindergarten but in 2014 we all insist on rewriting the whole thing from scratch (can't even use an actual database anymore "it doesn't scale").
When I was a 12 year old discovering dBase writing a networked CRUD application was something you'd do in roughly an hour. Today, a week is not that bad, apparently. When I turned 14, and worked with dBase for windows, putting rich text fields (with working copy-paste from office documents) was less work and finished faster, by a factor of 100. First I wrote them in things like dBase, then Delphi. Then I started writing them in PHP + SQL. This was tedious, but at least it was vaguely manageable. Today, I write them in Bash (for deployment) + Go + SQL + Python + Javascript + JSON, not counting the various configuration languages I need to know. They don't work nearly as well as the things I made in dBase for windows, without a doubt they are less functional than the tools I wrote in Delphi, and they can do vastly less on computers thousands times faster (my first Delphi was installed with 66mhz, 16M RAM and 500M drive) without weeks of work they don't look nearly as good, and they are utterly and completely incompatible with everything else on the planet.
This is why we had OO (the very first book I had on the subject started with how to make OO work for an extensive text editor). That's what's good about it, and why we're not doing it anymore ... I don't really know.
Today we are locked into the web. Any end user has no control whatsoever over their files, over what programs his computer runs (my "standard" text editor is in javascript and gets it's code downloaded from an internet provider that could change it at any time. I, of course, cannot change it), over who can read their files/mail, governments, MPAA, RIAA, and so on get people's mail clients blocked and their mail made inaccessible on a regular basis, ...
http://en.wikipedia.org/wiki/Worse_is_better http://en.wikipedia.org/wiki/Worse_is_better
- tboyd47 12y agoYes, I am also a web dev, and this does describe the state of the industry as I see it. Just wondering, but why Go? I ask because Go doesn't have objects, so why not use a regular OO language like C#?
- szabba 12y agoGo has objects and methods. What it lacks is inheritance.
- waps 12y agoGo has inheritance, including confusing method resolution orders and everything : http://golang.org/ref/spec#Struct_types http://golang.org/ref/spec#Struct_types ("AnonymousField" is the name they give to it. But it's inheritance. Badly executed and doesn't fit well in the type system, but that's par for the course for Go) I don't get where these statements keep coming from. Well, I do, to an extent : the Go authors keep claiming these sorts of things, but I don't understand why. They're not true. There is no complex language feature that Go does not have. Go has inheritance, Go has generics (simply inaccessible for everyone except the language authors, like in modula-2), Go has polymorphism (simply inaccessible for "mere" users). Go has return-value polymorphism. Go has type parameters, both in types and functions (again, inaccessible for users of the language, but it's there). Everything is simply built as custom compiler code that's inconsistent and riddled with unexpected edge cases, none of it worked into the type system itself. This is the real reason for resistance against these language features : working them into the type system would be a necessity, and isn't possible without breakage because they're not consistent.