|
Or just use a test card number.
|
# ? Dec 16, 2013 14:03 |
|
|
# ? Jun 5, 2024 05:46 |
|
The whole "OOP is the only conceivable way to do {X}" meme is a great example of how too much OOP causes brain damage.
|
# ? Dec 16, 2013 14:09 |
|
Zombywuf posted:When was it decided that OO == polymorphism? There are lots of types of polymorphism, only one involves sub-typing.
|
# ? Dec 16, 2013 14:25 |
|
That eevee post is pretty good. Eevee's point about the methods in the controller pattern actually being state is well conceived. I knew I didn't like callbacks implemented via inheritance but I hadn't put my finger on exactly why. Eevee's post nailed it. Lately I've been messing with some C++ classes that use the callbacks via inheritance pattern. It's a poo poo pattern, and that fact is highlighted by the base class having a member variable that contains the type of subclassed object it is. It was done so that common code in the base class could switch on the type of the class. It's pretty bad.
|
# ? Dec 16, 2013 14:36 |
|
Mustach posted:Since Simula and/or Smalltalk (smalltalk was about messages )
|
# ? Dec 16, 2013 14:36 |
|
What is the technical term for the way Go does it? Composition? Would that still be considered OO? I like that (but still wish it had generics).
|
# ? Dec 16, 2013 14:47 |
|
Mustach posted:Since Simula and/or Smalltalk I think the point is that while all OOP includes polymorphism, there are plenty of non-OO languages that still support polymorphism. In Haskell, which is certainly not object-oriented by any reasonable measure, there is a way to turn objects into strings. Of course, Haskell does this with type classes.
|
# ? Dec 16, 2013 15:20 |
|
Chin Strap posted:What is the technical term for the way Go does it? Composition? Would that still be considered OO? I like that (but still wish it had generics). Structural typing.
|
# ? Dec 16, 2013 15:28 |
|
Athas posted:I think the point is that while all OOP includes polymorphism, there are plenty of non-OO languages that still support polymorphism.
|
# ? Dec 16, 2013 16:03 |
|
Dren posted:code in the base class could switch on the type of the class. This is the biggest loving code smell in the world and I see it all the loving time.
|
# ? Dec 16, 2013 16:22 |
|
Pollyanna posted:Languages like Java with its crazy "EVERYTHING IS A CLASS" make the same mistake that's been repeated time and time again in history: it ditches a tempered approach to problem-solving and critical thinking in favor of one extreme ideology.
|
# ? Dec 16, 2013 17:11 |
|
quote:last week we had several unmonitored hours due to an issue with the nagios server. setup another nagios instance that only monitors the nagios server itself
|
# ? Dec 16, 2013 19:06 |
|
Sagacity posted:Please, go on. Can you give a few examples of the extreme ideology? I think he's specifically referring to "EVERYTHING IS A CLASS, NO EXCEPTIONS" as extreme ideology
|
# ? Dec 16, 2013 19:26 |
|
Which doesn't actually apply to Java, as it does have primitives.
|
# ? Dec 16, 2013 19:46 |
|
But Java has tons of exceptions
|
# ? Dec 16, 2013 19:46 |
|
Well how else would you do it?
|
# ? Dec 16, 2013 19:55 |
|
carry on then posted:But Java has tons of exceptions And checked exceptions!
|
# ? Dec 16, 2013 20:02 |
|
Sagacity posted:Please, go on. Can you give a few examples of the extreme ideology? Yes, heaven forbid you model your program as a class, as that might mean that hello-world type apps take a bit longer to write. Only a zealot would do such things.
|
# ? Dec 16, 2013 20:17 |
|
I know when I think of extreme ideology in programming languages, I think of Java
|
# ? Dec 16, 2013 20:19 |
|
Dietrich posted:Yes, heaven forbid you model your program as a class, as that might mean that hello-world type apps take a bit longer to write. Only a zealot would do such things. But those extra 4 lines of boilerplate code are such a barrier to productivity! Or, you can engage in ridiculous hyperbole like this acquaintance of mine:
|
# ? Dec 16, 2013 20:44 |
|
I don't been know what to say. Wow.
|
# ? Dec 16, 2013 20:49 |
|
Ithaqua posted:But those extra 4 lines of boilerplate code are such a barrier to productivity! Wat. Did your acquaintance create a GUI "Hello World" and build the interface by hand, as well as, I don't know - lots of other stuff? I haven't used much C# but that just doesn't make sense.
|
# ? Dec 16, 2013 20:50 |
|
Jesus christ, what the hell did he do to that thing!? Does he mean like the WPF template has 18 files? Still, what a crappy metric.
|
# ? Dec 16, 2013 20:52 |
|
I dunno, seems about right for a naive 'wc -l *.cs'? Assume you're running the HTTP server under C# too. The kind of LOC count where you're grabbing all the whitespace too, not counting semicolons. As disingenuous as you could possibly be. Not that I'd know anything about that.
|
# ? Dec 16, 2013 20:54 |
|
Glimm posted:Wat. Did your acquaintance create a GUI "Hello World" and build the interface by hand, as well as, I don't know - lots of other stuff? He probably created an ASP .NET application and chose one of the built-in templates, which does generate a ton of files and code... but it's a full demo application (including database back-end and authentication), so regardless, he's dumb. He's also one of those anti-"Micro$oft" zealots.
|
# ? Dec 16, 2013 21:13 |
|
Why does he need five lines to doPHP code:
|
# ? Dec 16, 2013 21:16 |
|
astr0man posted:Why does he need five lines to do I don't know, but keep in mind this is someone who will blindly consider PHP and ColdFusion to be better platforms than .NET based only on how many files and lines of code it takes to write "Hello World".
|
# ? Dec 16, 2013 21:20 |
|
astr0man posted:Why does he need five lines to do That isn't a complete PHP program. Without the opening and closing tags it will fail to run, even on the command line.
|
# ? Dec 16, 2013 21:24 |
|
PHP code:
|
# ? Dec 16, 2013 21:26 |
|
and PHP code:
|
# ? Dec 16, 2013 21:40 |
|
Just drop the tags and have:code:
|
# ? Dec 16, 2013 21:42 |
|
Pretty sure HQ9+ is better in that regard.code:
|
# ? Dec 16, 2013 21:51 |
|
One of Java's problems is lack of function pointers/delegates/lambdas/blocks/whatever-you-call-it. That leads directly to code spaghetti and a million lines of boilerplate. That ties back into the methods-as-state problem in my mind... If you can pass bits of executable code around cleanly, it makes it easier to design and use objects properly. Java directly requires what those posts were partially about... Creation of useless stupid objects just to hold a method. Lack of mixins/extension methods/categories is yet another thing that forces you to either layer on the boilerplate in your own project or makes the API so filled with factories and interfaces as to approximate a Rube Goldberg machine. Type erasure is also 100% inexcusable. Unfortunately it handicaps the entire feature if you want to do anything even halfway dynamic or interesting with generics. Java does suck. I'm sorry if that's what you learned in school or are forced to use at your soul-sucking corporate job. That doesn't change the fact that it sucks. Edit: sorry folks, I should have paid closer attention. I am not defending Pollyanna's statement. Leaving the rest of my post here for posterity because I never pass up an opportunity to poo poo on Java. Simulated fucked around with this message at 23:07 on Dec 16, 2013 |
# ? Dec 16, 2013 21:52 |
|
Ender.uNF posted:One of Java's problems is lack of function pointers/delegates/lambdas/blocks/whatever-you-call-it. That leads directly to code spaghetti and a million lines of boilerplate. That ties back into the methods-as-state problem in my mind... If you can pass bits of executable code around cleanly, it makes it easier to design and use objects properly. Java directly requires what those posts were partially about... Creation of useless stupid objects just to hold a method. Those are all reasons why C#/VB .NET are better than Java, no doubt. But Pollyanna's statement that's drawing so much derision could just as easily be applied to .NET as to Java. There are plenty of reasons that Java sucks, but the amount of boilerplate you need in order to write Hello World isn't one of them.
|
# ? Dec 16, 2013 21:56 |
|
Ender.uNF posted:Java does suck. I'm sorry if that's what you learned in school or are forced to use at your soul-sucking corporate job. That doesn't change the fact that it sucks. How many years of experience are you putting behind this opinion? How much experience with better languages that inform you of the tradeoffs and options available to a language designer? Pollyanna's basing it on a couple weeks, a few blog posts, and the 3 lines of boilerplate for Hello World. Don't devalue your opinion by viewing this as a team sport and rallying behind the other person saying the same thing. Nobody's defending java. Nobody's questioning that it sucks. We're questioning Pollyanna's strong stances on what we all know to be unsound footing.
|
# ? Dec 16, 2013 22:00 |
|
Glimm posted:Wat. Did your acquaintance create a GUI "Hello World" and build the interface by hand, as well as, I don't know - lots of other stuff? Here is the (complete) C# hello world example from MSDN: code:
|
# ? Dec 16, 2013 22:19 |
|
Ithaqua posted:But those extra 4 lines of boilerplate code are such a barrier to productivity! Ha, I want to get this guy's reaction to making a hello world program in Rails.
|
# ? Dec 16, 2013 22:19 |
|
Poor Pollyanna just wants to unleash poorly founded vitriol about Java is that so wrong?
|
# ? Dec 16, 2013 23:02 |
|
Things would just be so much better if we got rid of Java and made an intuitive visual programming language.
|
# ? Dec 16, 2013 23:04 |
|
|
# ? Jun 5, 2024 05:46 |
|
Ithaqua posted:Those are all reasons why C#/VB .NET are better than Java, no doubt. But Pollyanna's statement that's drawing so much derision could just as easily be applied to .NET as to Java. There are plenty of reasons that Java sucks, but the amount of boilerplate you need in order to write Hello World isn't one of them. My apologies, I edited my post. I wasn't paying attention to post history on that one.
|
# ? Dec 16, 2013 23:05 |