Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@ScribeOfGoD instead of using a css file you put the styling in the <> tag, now this is something like that only worse
-
@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?
-
@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 -
@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!
-
psudo3408y@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.
-
Drastic32168yI 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. -
psudo3408y@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.
Related Rants
this is the rant of the rants
undefined
rant
rant of the rants
java