Coffeehouse Thread

41 posts

Java value types Vs .NET

Back to Forum: Coffeehouse
  • User profile image
    Bass

    @BitFlipper:

    I agree that anonymous classes are verbose. But any modern IDE will generate the anonymous class for you using autocomplete, so the amount of keystrokes in Java and C# ends up being very similar.

  • User profile image
    cbae

    @Bass: You seem to be just as well-versed in Java apologetics as you are in JavaScript apologetics. Smiley

  • User profile image
    Bass

    I'll take that as a compliment, I guess.

  • User profile image
    Ray7

    ,Bass wrote

    @BitFlipper:

    I agree that anonymous classes are verbose. But any modern IDE will generate the anonymous class for you using autocomplete, so the amount of keystrokes in Java and C# ends up being very similar.

    I think bringing the IDE into the argument is a bit of a red herring. The fact remains that anonymous classes are not closures. Aside from the extra boilerplate, which I agree is not that much of a big deal, they're just not as versatile. The final variable requirement is just stupid.

  • User profile image
    Bass

    ,Ray7 wrote

    *snip*

    I think bringing the IDE into the argument is a bit of a red herring. The fact remains that anonymous classes are not closures. Aside from the extra boilerplate, which I agree is not that much of a big deal, they're just not as versatile. The final variable requirement is just stupid.

    How it a red herring? I doubt people writing Java are using Notepad to code. The IDE indirectly fixes a lot of the language's deficiencies.

    I never encountered a time where I was like "damn I wish I could write closures for mutable value types". So I don't find the final requirement to be a big deal.

    Oracle intends to add "true closures" to Java 8, but I am not sure what that will accomplish other then complicating the language. If they really want to improve Java they'd let me disable checked exceptions somehow.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.