16

this is the rant of the rants

Comments
  • 0
    ARE YOU SERIOUS
  • 1
    @RazorSh4rk yes
  • 1
    And for those of us that don't do java?
  • 1
  • 2
    Why is this a rant?
  • 4
    @maximizer lambdas in Java 8
  • 1
    @Scrumplex so lambdas can simplify this? I am lost...
  • 2
    @ScribeOfGoD instead of using a css file you put the styling in the <> tag, now this is something like that only worse
  • 3
    @maximizer it would be
    new Thread(() -> {
    //do stuff
    }).start();
  • 0
  • 2
    @maximizer you instantiate a class in the argument of an instabtiation of a class and override a method of the instantiated argument class, do you see how terrible is that?
  • 2
    @RazorSh4rk and Java 8 gets even worse, when working with Lists and Maps. For example: I have a String list, and want to create a new List of the class Person. A Person object can be constructed using new Person("name").
    Java 7:
    List<Person> people= new ArrayList<>();
    for(String item : strings) {
    persons.add(new Person(item));
    }

    Java 8:
    List<Person> people = strings.sort().stream().map(Person::new).toList();
    //or something like that

    WTF
  • 0
    @RazorSh4rk when you put it that way... That's pegi-18. So long i took it for granted without thinking about it... This shit is horrible!
  • 0
    think the rant is the thread is not doing anything?
  • 0
    @Scrumplex Your op code sample is in the old style, not lambda, so I'm kinda confused about your rant later on. I admit I haven't really fucked around with streams (I'd rather use Scala if I want to do a functional/oop hybrid), but in general your later complaints are more straightforward in 8 and are doing a lot more.
  • 3
    I don't see a problem here. This methods has been in use for a long time already.

    @RazorSh4rk you do know Google's homepage doesn't have a css file either and loads the css in style tags, right?

    It's just a matter of what approach will be better in which case.
  • 1
    When you don't know Java haha
  • 0
    Obfuscators often put whole classes to anonymous classes, to fuck decompilers up.
  • 0
    @gchase It's the older standard convention for kicking off a new thread in Java. Thread takes a subclass of Runnable as it's argument. Runnable only has one method, run(), so if what you're doing is fairly local you can create an anonymous class (one that doesn't have a name) right in the Thread declaration.
Add Comment