by yegor256a on 6/24/19, 7:36 PM with 34 comments
by saagarjha on 6/24/19, 8:10 PM
https://www.yegor256.com/2014/05/13/why-null-is-bad.html
https://www.yegor256.com/2014/05/05/oop-alternative-to-utili...
Apparently he replaces null with null objects or throwing exceptions, and creates objects for every static method. Go figure.
Actually, there are a few gems:
> The Map interface (no offense to its authors) has a design flaw.
> It is a good practice to make your code as fragile as possible, letting it break when necessary.
> The method is basically asking the object about its… race. Black objects go right while white objects go left. That’s what this instanceof is doing, and that’s what discrimination is all about.
by fwilhe on 6/24/19, 8:14 PM
by Xorlev on 6/24/19, 8:03 PM
by kasperni on 6/24/19, 8:11 PM
int max = new Max(10, 5).intValue();
over
int max = Math.max(10, 5)
Yeah, think I am going to pass.
by jbverschoor on 6/24/19, 8:07 PM
It’s a good exercise though!
by lalaithion on 6/24/19, 8:02 PM
void transform(File in, File out) {
Collection<String> src = new Trimmed(
new FileLines(new UnicodeFile(in))
);
Collection<String> dest = new FileLines(
new UnicodeFile(out)
);
dest.addAll(src);
}
was "That looks just like Haskell".by gerbilly on 6/24/19, 8:05 PM
1: Reminds me of Golang, which likes to define itself as a set of 'negative liberties' (No exceptions, no inheritance, no polymorphism, no ...).
by saagarjha on 6/24/19, 7:59 PM
main?
by ribtoks on 6/25/19, 4:50 AM