Say I had an array of masses and their velocities and I wanted to calculate the kinetic energy of each mass using the equation:
E = 1/2 mv^2
With operator overloading:
E = 0.5 * (m * v)**2
Without:
E = (m.mult(v)).pow(2).times(0.5)
The operator overloaded example is Python (numpy) - the non-overloaded one is something I made up, but it's basically what it would need to look like.
I think the first example is much closer to the maths.
This is not some contrived example, if you have raw data and you're using mathematical equations to work out relationships you do this kind of thing all the time.
Look at this http://stackoverflow.com/questions/11270547/go-big-int-facto... and compare how the function looks with int and with big.Int. Interestingly, big.Int has a method MulRange, which does exactly what the function would otherwise do, but this won't be the case the majority of the time. Given the extra tedium involved, someone working heavily with vectors, matrices, big numbers, etc., would certainly care about operator overloading.
I am not a scientific programmer, but I'm going to attempt to provide an example anyway until someone else does one better.
I think there are certain mathematical operations that operate over what would be implemented as complex objects, so it is convenient to continue using these agreed upon symbols to implement your work.
// addition and multiplication of native integers
1 + 3 * 4
// add and mult of math objects
matrixA + matrixB * matrixC
// here the math is slightly occluded
add(matrixA, multiply(matrixB, matrixC))
I understand, but OTOH I was actually happy finding out this wasn't a real article when opening it in twitter, and thought some HNers would appreciate the feeling as well.
"For example, I didn't contact github because I knew one of the peole working there was in on the joke."
hmm, couldn't it be that some other customer service people would actually do their job about your issue? How do you know it would all be channeled through this one guy that was in on the joke? In any case if they did ignore your request, you could still do the whole crashing thing...
One thing that helped me to learn English was to watch movies (especially stuff with cool oneliners) with both subtitles and close captions on when possible, so I get a transcript of the dialogue and a translation at the same time. Later on I only needed the English subtitles to verify that what I heard was correct.
Movie quotes are great because they lend themselves to repetition (much to the annoyance of everyone else in the room).
One can't escape the corporations or governments' influence. They are already in every aspect of one's life. Rather than trying to build a super secret treehouse away from their gaze it's more productive to find a way to protect people's freedoms within the current system. To make it so senators do not have the power to meddle with the network arbitrarily.
Why not work on both political and technological solutions to the problem? The more ways the problem is attacked, the more likely one attack will succeed.
It causes readers to either slap their foreheads and say 'oh wow, 200 lines? I could have done that! why didn't I think of it?' or 'oh wow, it takes true genius to hit just the right 200 lines. I could have never done that!', the common factor being 'oh wow'
Why is the "I could have done that" reaction a good thing?
That implies "this should have been done from the beginning, but the developers were lazy / incompetent"
Also, it is better to have 500 lines of well-commented code with informative variable names, than just the right 200 lines. Software development should not be reserved for voodoo witch doctors who know just the right mysterious incantation to produce the desired effect.
Encouraging people to have the mentality "do it in < N lines or don't try" seems silly.
The future as fallen prey of the hand-wavy notion that things will be taken care of somehow by someone. Problem is, taking action can involve hard work, spending time in jail or other unpleasant activities so when there's abuses people just let it slide.
Maybe it's cynicism, maybe cowardice or just plain laziness. Anyway, gotta get back to watch Seinfeld reruns and stuff my face.
oooor bills to pay...