1,002 karma · joined July 1, 2015
Also, its very strange to see these concepts illustrated with Javascript. I imagine thats something like trying to learn Chinese using the roman alphabet. Not that it can't be done, but a lot of important details are necessarily missing.
sudo apt-get install emacsThat's a terrible idea.
https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffal...
I don't think this is a fair judgememt. For example, how many apps are written in Cobol? I can't think of a single one, but Cobol code is running much of the world.
This is certainly true. But there are also times when there is nothing natural about it at all. Consider this scenario:
I give you a cup of coffee. You set it on your desk to cool. Then when you go to take a sip, the cup is empty! You see, I gave you the same cup I was drinking from.
#define whenceforth for
I think that's a decent way to explain java's lambda expressions to developers without fp experience, but it's not technically correct. Lambda expressions are compiled into static methods in the class file.
/pedantic
Here's a Java example where I want the type system to enforce that a method in `ClassB` can only be called from `ClassA`. However, the fact that `null` circumvents the type system makes this pattern just wishful thinking.
class ClassA {
private static final Witness witness = new Witness();
final static class Witness {
private Witness() {}
}
void callClassBMethod(ClassB classB) {
classB.onlyClassACanCallThisMethod(witness);
}
}
class ClassB {
void onlyClassACanCallThisMethod(ClassA.Witness witness) {
// ...
}
}This is really a matter of perspective. A typical enterprise application is running on a beafy multicore processor and spending most of its threads' cycles waiting for database IO. Also, it's not really a concern if your jar file is 100 MB when your machine has 256 GB of ram. From this perspective, the fact that an application can be quickly slapped together from the multitude of Java libraries and frameworks by a stackoverflow savvy junior developer far far outweighs the marginal performance benefits that could be gained from using a language that compiles to native code.
The fact is that Hotspot has made the jvm perform "good enough" for this kind of domain. And keep in mind that many enterprise developers (at least in my experience) have never used a language besides Java, so this level of performance is normal to them.