Live data from Hacker News

Java 7 is now available

oracle.com

201–210 of 218 posts

Re: Java 7 is now available

#201

Earlier quoted context omitted.

I'm well aware that I don't know everything--but, with what little respect is due a troll like yourself, apparently I know more than you. :-) After all, I'm not the one saying "you don't need that" because I don't understand it; on the contrary--I am saying that these tools greatly empower a programmer to write better code. Because they do. You can certainly write "good" Java, but it will not be in the same ballpark…

You'll look back at these comments you're making in 10 years and be embarrassed. Hopefully by then you will have learnt a bit more about being a productive programmer. The language doesn't matter. Repeat after me... A good programmer can make good stuff in ANY language. A bad programmer can only make good stuff in their favorite language. You should stand up, be confident, and realize that it is the programmer that c…

[deleted]

Re: Java 7 is now available

#202

Earlier quoted context omitted.

I'm well aware that I don't know everything--but, with what little respect is due a troll like yourself, apparently I know more than you. :-) After all, I'm not the one saying "you don't need that" because I don't understand it; on the contrary--I am saying that these tools greatly empower a programmer to write better code. Because they do. You can certainly write "good" Java, but it will not be in the same ballpark…

You'll look back at these comments you're making in 10 years and be embarrassed. Hopefully by then you will have learnt a bit more about being a productive programmer. The language doesn't matter. Repeat after me... A good programmer can make good stuff in ANY language. A bad programmer can only make good stuff in their favorite language. You should stand up, be confident, and realize that it is the programmer that c…

[deleted]

Re: Java 7 is now available

#203

Earlier quoted context omitted.

I'm well aware that I don't know everything--but, with what little respect is due a troll like yourself, apparently I know more than you. :-) After all, I'm not the one saying "you don't need that" because I don't understand it; on the contrary--I am saying that these tools greatly empower a programmer to write better code. Because they do. You can certainly write "good" Java, but it will not be in the same ballpark…

You'll look back at these comments you're making in 10 years and be embarrassed. Hopefully by then you will have learnt a bit more about being a productive programmer. The language doesn't matter. Repeat after me... A good programmer can make good stuff in ANY language. A bad programmer can only make good stuff in their favorite language. You should stand up, be confident, and realize that it is the programmer that c…

I think an example is in order. I'm going to code up a simple event dispatching algorithm in three languages. They'll have the same functionality. I consider myself fluent in all three, and I'll write them in the most consise and style-respecting way I can.

C++:

    #include 
    #include 
    #include 
    typedef void (*hndlr)(std::string);

    class Event {
      private:
        std::vector handlers;
      public:
        void Listen(hndlr handler) {
          handlers.push_back(handler);
        }
        void trigger(string arg) {
          for (std::vector::iterator i = handlers.begin(); 
              i != handlers.end(); i++) {
            (*i)(arg);
          }
        }
    };
    
    void h1(std::string arg) { 
      std::cout 
Lua:

    event = {listeners = {}}

    function event.listen(self, handler) 
      if (type(handler) ~= "function") return end
      table.insert(self.listeners, handler) 
    end
    
    function event.trigger(self, arg) 
      for handler in self.listeners do handler(arg) end
    end
    
    event:listen(function(text) print("First handler got "..text) end)
    event:listen(function(text) print("Second handler got "..text) end)
    event:trigger("something happened!")
    
C#:

    using System;
    public delegate void HandlerDelegate(string arg);

    class Main {
      static event HandlerDelegate Event;
      static void Main() {
        Event += (arg) => { Console.WriteLine("First handler got" + arg); };
        Event += (arg) => { Console.WriteLine("Second handler got" + arg); };
        Event("something happened!");
      }
    }
    
    
Now, go ahead and say that choice of language doesn't matter. You might not need lambdas, or first-class functions, or event handlers, and a good programmer can make the same algorithm "work" in any language. But by choosing a more powerful and expressive language, you can get those algorithms done in a way that's more readable, maintainable, and faster to code, which in the end is what really matters.

Re: Java 7 is now available

#204

Earlier quoted context omitted.

You'll look back at these comments you're making in 10 years and be embarrassed. Hopefully by then you will have learnt a bit more about being a productive programmer. The language doesn't matter. Repeat after me... A good programmer can make good stuff in ANY language. A bad programmer can only make good stuff in their favorite language. You should stand up, be confident, and realize that it is the programmer that c…

I think an example is in order. I'm going to code up a simple event dispatching algorithm in three languages. They'll have the same functionality. I consider myself fluent in all three, and I'll write them in the most consise and style-respecting way I can. C++: #include #include #include typedef void (*hndlr)(std::string); class Event { private: std::vector handlers; public: void Listen(hndlr handler) { handlers.pus…

Also fun: The only one of these that works when a callback removes itself from the event list in its own callback routine is C#. You get a hanging iterator in C++, and removing items from a table mid-iteration in Lua is undefined (though in practice usually works).

To make this case work properly, the place I work for has a 335 line C++ template class. This is all time that the developer could have spent actually building our product.

Re: Java 7 is now available

#205

Earlier quoted context omitted.

You'll look back at these comments you're making in 10 years and be embarrassed. Hopefully by then you will have learnt a bit more about being a productive programmer. The language doesn't matter. Repeat after me... A good programmer can make good stuff in ANY language. A bad programmer can only make good stuff in their favorite language. You should stand up, be confident, and realize that it is the programmer that c…

I think an example is in order. I'm going to code up a simple event dispatching algorithm in three languages. They'll have the same functionality. I consider myself fluent in all three, and I'll write them in the most consise and style-respecting way I can. C++: #include #include #include typedef void (*hndlr)(std::string); class Event { private: std::vector handlers; public: void Listen(hndlr handler) { handlers.pus…

The C++ version could be greatly simplified by using boost::bind. It'd still be shorter and clearer than a Java equivalent that had to bung in anonymous classes and other crap to create a proper dispatch.

Your point, however, totally stands.

Re: Java 7 is now available

#206
post #72

There is a good amount of stuff to get excited about in this release. - Try-with-resources-Catch-Block [0] - Fork/Join libraries from Doug Lea (author of Executor framework) [1] - Inferred/Simpler generics in declarations (should have been in Java 5) - NIO2, brand new/robust filesystem APIs [2] - NIO2, treat ZIP/JAR files like directories of files for R/W [3] - SDP support [4] - String-in-switch (NOTE: check on perfo…

Oh sweet jesus finally collection literals. Why did it take more than 10 years to decide to bring in something so convenient? One reason I sometimes find Java repulsive is the fact that it takes so much redundant code to do something so simple. Why do they hold back on such syntactic sugar?

Oh god. Please no, collection literals are the worst idea ever. Making up special rules for some special classes in a language? What the fuck!?

Re: Java 7 is now available

#207
post #72

There is a good amount of stuff to get excited about in this release. - Try-with-resources-Catch-Block [0] - Fork/Join libraries from Doug Lea (author of Executor framework) [1] - Inferred/Simpler generics in declarations (should have been in Java 5) - NIO2, brand new/robust filesystem APIs [2] - NIO2, treat ZIP/JAR files like directories of files for R/W [3] - SDP support [4] - String-in-switch (NOTE: check on perfo…

Syntactic Sugar: Collection literals List people = {"Frank", "Mary", "Satan"}; I find it breathtaking this isn't core yet. I was writing test fixture support code for 1.4 to easily and DRYly generate lists of up to 10 items, which required 10 copy-paste functions each with a different number of arguments. 1.5 came along and made it possible to easily do it with one function thanks to varargs, but it's 6 years later a…

What's wrong with List.of(...)?

I think adding special syntax rules is a pretty bad idea.

Re: Java 7 is now available

#208

Earlier quoted context omitted.

I'm well aware that I don't know everything--but, with what little respect is due a troll like yourself, apparently I know more than you. :-) After all, I'm not the one saying "you don't need that" because I don't understand it; on the contrary--I am saying that these tools greatly empower a programmer to write better code. Because they do. You can certainly write "good" Java, but it will not be in the same ballpark…

You'll look back at these comments you're making in 10 years and be embarrassed. Hopefully by then you will have learnt a bit more about being a productive programmer. The language doesn't matter. Repeat after me... A good programmer can make good stuff in ANY language. A bad programmer can only make good stuff in their favorite language. You should stand up, be confident, and realize that it is the programmer that c…

You ignorance is so painful embarrassing, it almost hurts to read your non-sense.

Re: Java 7 is now available

#209

Earlier quoted context omitted.

I'm well aware that I don't know everything--but, with what little respect is due a troll like yourself, apparently I know more than you. :-) After all, I'm not the one saying "you don't need that" because I don't understand it; on the contrary--I am saying that these tools greatly empower a programmer to write better code. Because they do. You can certainly write "good" Java, but it will not be in the same ballpark…

You'll look back at these comments you're making in 10 years and be embarrassed. Hopefully by then you will have learnt a bit more about being a productive programmer. The language doesn't matter. Repeat after me... A good programmer can make good stuff in ANY language. A bad programmer can only make good stuff in their favorite language. You should stand up, be confident, and realize that it is the programmer that c…

I'm embarrassed for both of you. Will you please stop baiting one another?

Re: Java 7 is now available

#210
post #82

Earlier quoted context omitted.

Good luck with that wish.

I would have to lookup the serious academic paper that says peel is technically unparsable in the same ways as PL/1. I think to date there have been two aborted perk on java efforts Not sure if perl6 has the same properties mind.

I wish I had checked that over I just saw that my phone mangled perl twice
Post reply on HN