Announcement

Collapse
No announcement yet.

Programming question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • The fact that you can implement closures in Java by wrapping things up in various levels of pointless abstractions to accomplish the same thing does NOT mean you are implementing the actual concept. You are approximating it.


    What is this even supposed to mean? Approximations are typically things that produce almost, but not quite, the same value - but Java closures produce the same answers as C# or Javascript or Python closures, and the most 'cheating' they ever do is an occasional extra bit of indirection. The legitimate contrast is with languages that don't even arguably have closures because to get the same answers you end up having to write a compiler.

    Comment


    • You've then spent a ridiculous number of posts claiming the authors of Java are wrong when they say Java does not support closures. You seem to be under the impression that supporting true closures in Java is just a matter of "syntax", when in reality it requires a big change in the whole JVM.


      No, to use closures now is just a matter of syntax. To support closures that are simultaneously:

      1) syntactically convenient
      2) fully generalized
      3) not memory-abusive

      you need to revise the JVM. But right now you can do either 1 and 3, or just 2 ,just fine in Java.

      Comment


      • Originally posted by Kuciwalker View Post
        What is this even supposed to mean?
        It means while your fake Prada handbag looks like a Prada handbag, it is not. To claim it is a Prada handbag when it is simply an approximation of a Prada handbag is wrong.

        Even if they can have the same end functionality.

        Approximations are typically things that produce almost, but not quite, the same value - but Java closures produce the same answers as C# or Javascript or Python closures
        It depends how you look at it. If you look at it from a strictly high level, you are right. But then what is the point at all -- you can produce the answer you get from any closure without using closures at all. Is now anything a closure because the answers end up the same in the end? What a ridiculous statement.

        Closures exist because they have neat, tidy syntax and have performance/resource advantages over more heavy-weight implementations like anonymous classes. Just because you can arrive at the same answer using far more CPU cycles, memory, and programmatic indirection does not mean it is the same thing.
        "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
        Ben Kenobi: "That means I'm doing something right. "

        Comment


        • Another point of order: When we say Java supports this feature, we do not just mean the Java language, but the JVM. Even if you can approximate the behaviour of closures in the Java language, if you look under the hood, the JVM most assuredly does not support closures.
          "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
          Ben Kenobi: "That means I'm doing something right. "

          Comment


          • Originally posted by Asher View Post
            Another point of order: When we say Java supports this feature, we do not just mean the Java language, but the JVM. Even if you can approximate the behaviour of closures in the Java language, if you look under the hood, the JVM most assuredly does not support closures.
            That's just because anonymous classes were bolted on, and poorly.

            Comment


            • I hate you both.
              12-17-10 Mohamed Bouazizi NEVER FORGET
              Stadtluft Macht Frei
              Killing it is the new killing it
              Ultima Ratio Regum

              Comment


              • It's no different than your dreary economics debates.
                "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                Ben Kenobi: "That means I'm doing something right. "

                Comment


                • The key to being a good programmer is to swing your dick and bang it continually against the key board.
                  Try http://wordforge.net/index.php for discussion and debate.

                  Comment


                  • The problem with that is that it presses all the keys all the time
                    Indifference is Bliss

                    Comment


                    • You code on an iPhone?
                      12-17-10 Mohamed Bouazizi NEVER FORGET
                      Stadtluft Macht Frei
                      Killing it is the new killing it
                      Ultima Ratio Regum

                      Comment


                      • I've typed code snippits on my iPhone in emails to people. It's not fun.
                        "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                        Ben Kenobi: "That means I'm doing something right. "

                        Comment


                        • SSH client for android
                          12-17-10 Mohamed Bouazizi NEVER FORGET
                          Stadtluft Macht Frei
                          Killing it is the new killing it
                          Ultima Ratio Regum

                          Comment

                          Working...
                          X