- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
And your point is...?
Admin
If I'm not mistaken, he has two points.
Admin
It is impossible to say it is the worst. In fact, it is not even a WTF in some scenarios resembling your case 3.
If you already have a mindless 2-choice field, and you keep getting calls from people annoyed that it always assume they are one gender or the other, you can use a mindless regex to shut down the mindless calls.
"I'm sorry, ma'am, we really are trying to make our site more attractive to everybody. We no longer assume everybody is male, and we try to make an intelligent guess. But as you well know, with a name like Leslie, there is no way to get the right answer in all cases."
Admin
Unless you're a lawyer...
Admin
Cold Fusion still exists??? Wow. Of course no real surprise as any programming language never seems to truly die... I remember using it back in 1998/1999 when it was Allaire Cold Fusion (still have a mousepad somewhere with the logo). Was great then but sure wouldn't want to still be using it.
Admin
I used it earlier this year :imp: -- we use it for quick-and-dirty reporting or internal-plumbing webapps where I work. It's weird, but at least it beats the pants off of PHP for quick-and-dirty stuff.
Admin
Doesn't almost everything beat PHP ;) Except classic ASP... that's the worst. Did a tiny bit of PHP briefly right before learning CF. Work with some guys in the legislative branch that do all their web development in PHP, so maybe there's something I'm missing about it but I'm not sure what.
Then again, I develop in ASP.NET (unfortunately VB.NET because of employer's preference but I prefer C#) and I can just hear the negative comments about .NET coming....
Admin
Yeah, I've done some DoD work, and it's surprising how strong the preference for PHP is in government. Then again, it shouldn't be. Government choosing the most WTF language? Business as usual. :smirk:
And you won't see too much .NET hate here outside of @cartman82's posts.
Admin
Whoa, whoa... when did I say that I hate NET? On the contrary.
Admin
Maybe I'm thinking of someone else that got into it with blakey.
Admin
You're right, I am surprised. Most of the stuff I've seen has been .NET.
Admin
If everyone and their dog who writes .NET books didn't insist on trying to tie .NET to The Windows Way (TM) -- I wouldn't mind ASP.NET MVC paired with a good language (F#, anyone?)
Admin
Because it's impossible to write a good API using a object oriented language! Tarunik has given literally... uh... zeros of examples of that in the past!
Admin
Wasn't the whole point of this object oriented stuff to simplify doing reasonable interfaces that don't have the internals sticking from all sides?
Admin
Don't let any of that get in the way of @blakeyrat misunderstanding something @tarunik said.
Admin
I can't misunderstand it because he hasn't said it yet.
Admin
Weren't you the one who said that the "innovative hipsters who make the world a better place" don't use "boring things like .NET"?
Admin
The problem is that many interpretations of OO impose constraints on your domain-language-to-computer-language mapping that often get in the way of making that mapping as natural as possible. However, FP languages have encapsulation mechanisms as well, because yes, leaving your guts hanging out in the breeze isn't a good idea.
Admin
Admin
That's an observation about the current state of the IT industry. It has no correlation to the qualities of .NET itself.
Admin
Took a fabulous training course a few years back by a guy who taught using .NET truly from the ground up... didn't use it at all the way MS pushes. From an HttpHandler built a web app using just domain-driven design and OO principles, it was great. Yeah, I'm not much a fan at all of the MS way, especially all the certifications that certain places (especially consultant companies) want so very much.
Admin
Please be more specific here. Not that I'll necessarily disagree, but right now you've effectively made an unsupported assertion and I hate that sort of thing. At the least, I'd like to at least know whether I think you're right or wrong, even if I might not bother telling you which. :smiling_imp:
Admin
The main limitations I have seen are as follows:
Admin
Do you have a specific example where OOP fails? Perhaps something that is not abstract?
Admin
Understand where you're coming from, but have some disagreements with you. [spoiler]Also, “Discouuuurrse!” for renumbering of list elements.[/spoiler]
The same limitation is in natural languages as well; if one wishes to operate on a group of things, it is the _group_ that is the subject. Multimethods have yet to properly convince me that they're not a mistake, but then I'm not actually that keen on overloading either. (It's neat until you're trying to read the code and figure out what's really going on, when it becomes a complete headache. Smartassery. Feh…) The limitation is merely in your head; the space of alphanumeric words is enormously large (beyond countably finite if we ignore length restrictions).Java actively rejects operator overloading; the only overloads at all are those in the language specification itself. The world doesn't crash and burn.
If I was going to add operator overloading, I'd do it by requiring the objects concerned to implement algebraic structures — Group, Ring, Field, etc. — and I'd permit compilers to assume that those algebraic structures can be optimised in the ways that mathematicians would understand as valid. Which would rapidly put a stop to the shenanigans that mark out most operator overload abuse…
The major limitation is actually that variadic operations are weakly supported in Java. Even though you can do it now, you're stuck with very little language support for them. Other languages do far better at this.The lack of strong support for variadic operations forces all sorts of nastiness. (Those C++ tricks? I believe you can see them in some libraries in Java too, though the way they're expressed in the type system is a little different.)
That's more to do with those languages being imperative, mutable reference, id-equivalence languages. OO is an independent axis; you could easily have it with a strict immutable, value-semantics system. OO is about data encapsulation and restriction of the set of operations that may be performed on a particular tuple of encapsulated data (which helps the programmer enforce the Law of Demeter).So… most of the things you complain about are not to do with OO as such, or are based on misunderstandings. The only really valid thing in there related to adverbs, and that's more related to other features of the language (complex type patterns for variadic operations) so I guess it's another “not really an OO problem” thing. As it stands, languages which reject static type checking can handle the adverb problem much more handily, though this causes problems for IDEs.
Admin
I think that we've shown, through the course of like 3 of these threads quizzing him, that he does not.
I'm not even sure he's capable of thinking about anything that's not at least 46 levels of abstraction removed from reality.
Admin
Interesting deconstruction, thanks.
Ever realized that programming is an abstraction exercise, full stop? My argument is that we need as many tools as possible for building good abstractions (not that we need to be piling them atop each other: *that* issue is a whole another can of worms) -- C# is getting closer these days, but the amount of "not learning from history" programming language designers have done is *amazing*, isn't it, Blakey?P.S. The system I deal with at work has a protocol handling system that is data-driven to the bit level. Yes, I said it right: it has tabling that specifies the meaning of individual bits in protocol messages.
Admin
Seemed more like a demolition to me.
There's required abstraction, and there's "let's go get lost in the woods!" abstraction. Abstraction sucks. The further you get from the problem, the harder the problem is to solve. It's a necessary evil, not something we should be embracing.
No; we need good, full, well-designed libraries for doing common tasks. Something C# and .NET excels at, compared to whatever open source bullshit language-of-the-week you're shilling.
If I can, in one line of code, say, "grab an image from an HTTP server and save it on the local network/drive at this path", you've saved me a lot of time and effort. And now when I work-out the problem I'm solving, I can put that whole thing in a single box with an arrow and I don't have to worry about all the minute details.
The solution isn't in the language; the solution is in the language's standard library. That's what made Mac Classic such a joy to code in. That's what makes .NET such a joy to code in.
Well we agree on that, at least.
History is full of examples where some empty-headed designer tried to abstract-away the world and ended up with a piece of shit. What do you think Lotus Notes is?
Remember that "Mesh Operating Environment" bullshit that Microsoft was trying to sell as a universal solution to all problems:
[image]Yeah, it was a piece of useless crap. Interestingly, it was spear-headed by the guy who designed Lotus Notes, Ray Ozzie... hmm! (Also the funny thing about that is it was pretty much 100% what Joel Spolsky predicted would happen when abstraction-lovers tried to figure out peer-to-peer.)
Does this have something to do with the debate? I'm confused.
Of course the real issue here is more of a social/communication one. You're telling us we're doing it wrong. When we ask how we're doing it wrong, you respond with this abstract bullshit instead of actual addressable concrete examples. Now you might be God Of Programming, but when I see shit like that in a forum, my head thinks: "he's not giving any examples because there aren't any. There aren't any examples because he's spouting utter Grade A bullcrap."
Admin
FTFY. Libraries are a property of the platform, not the language -- I can call all the same libraries from SML.NET that I can from C#. So -- realize that better languages exist in the very platform you have embraced and all is well, alright?
Admin
Of all the words I typed, that's the only thing you found worth responding to?
Jesus Christ.
Admin
That's the same too many abstractions syndrome that I referred to earlier.
Also -- I don't give concrete examples because you invariably toss them out as "this doesn't apply to <whatever-blakey-is-doing-at-the-moment>".
Admin
How about you just toss-out one and try me?
Admin
So, you want an example of a good abstraction that doesn't mesh well with OO, so have
with-db-transaction
:You might recognize this as akin to a
using
block -- you're right; my argument is that you shouldn't need to go in and modify the core language just to implement such a creature, unlike having to add a special-purpose feature such asusing
blocks to handle this type of construct.Admin
No, I'm still waiting for the "factors of good API design that simply cannot be captured or taught in an OO-centric model".
Ok; so I do have that in my OO language.
Who gives a shit how it's implemented as long as it is implemented?
"The UK doesn't have fire trucks!" "Yes they do." "That doesn't count because theirs are painted yellow and not red!"
Admin
Because it added a special-purpose feature to do that -- my argument is that the language designers shouldn't have to add a special-purpose feature simply to facilitate resource management -- it's a sign they picked the wrong general-purpose building blocks to start with.
Admin
Right; I get you're argument. What I'm asking, if anything, is why do I, a builder of applications, give a flying fuck how it's implemented as long as it is? What, practically, is the impact to me?
Or maybe it's a sign that they (wisely) started from a relatively minimal core and waited to see what was and was not desired before adding to it.
Or maybe it's a sign that they tried a "general purpose building block" which allowed that from day one, but had to can it because of performance or debugging reasons, and so it remained a special-case.
You're making a few assumptions here.
And just a reminder that the question that started this entire thing is:
What are the factors of good API design that simply cannot be captured or taught in an OO-centric model? That's a claim you made I can't simply let lie.
Admin
Have you ever written a library? That is why these things matter.
Admin
Dozens.
I guess I need another example because I ain't seeing it.
Then again, I wrote them in a language that has
using()
.Admin
The best statement I have found of this is a quote attributed to Carmack: "Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function."
In other words: OO puts an upper bound on the elegance and simplicity of implementations. Think of Java having to create a utility class just to hold a bunch of mathematical functions that have no state and are conceptually independent from each other apart from being 'common math functions' (what do arctangent and the incomplete gamma function have in common?).
Admin
Wait a minute, ALL THIS TIME you were dodging the question... and the answer was, "I don't like that you can't have a function outside a class?" 12 words? You typed like 500 words to avoid typing 12 words?
Jesus.
The funny thing is I kind of agree with you. I wouldn't mind at all if you could put static functions directly inside a namespace with no class around them. Fuck the "language police". However, on principle, I must now call you an idiot. You're an idiot.
Admin
The "no functions outside classes" is just one example of "OO puts an upper bound on the elegance and simplicity of implementations". Look at point-free style (if you can't find examples of this -- Unix shell pipelines are point-free style in disguise) for other examples of this -- while method chaining can be done in OO, it's much more limited due to the lack of facilities for currying methods in many OO languages (C++, oddly enough, can -- did they remember to add that to C#?)
Homoiconicity (i.e. your programming language is represented in its own primitive data structures, and the syntax of the language mirrors its abstract syntax tree) is another thing that OO will never get to...
Admin
Yeah sorry I edited that question out. I get it entirely.
Now I'm puzzling over the whole, "why didn't you just say that 2 days ago?" thing.
Don't get me wrong: I still think you talk like an overedicated blowhard, and I doubt you've ever made a single genuinely useful or clever thing in your life.
And that is desireable because...?
Look, buddy. You know we're going to ask these follow-ups, why don't you just explain it the first time and save everybody the effort?
Admin
Because the scenic route is fun sometimes?
Admin
I think it's more likely that:
Or...
Or both.
Admin
Or, someone's trying to lead you to water instead of just handing you a cup -- although I will admit that I didn't do a very good job of it, clearly!
Admin
Even doubles don't technically meet that requirement.
Admin
Admin
Yes, but we'll gloss over that. :smile:
Admin
But it does mesh extremely well with Aspects. Just sayin'…
http://en.wikipedia.org/wiki/Aspect-oriented_programming