A Highly Opinionated List of Coffee Shops in Berlin
code.hazzens.com1 pointsby hazzen0 comments
qq<do stuff>q
Emacs define a macro: C-x ( <do stuff> C-x )
Vim do that macro again 40 times: 40@q
Emacs do that macro again 40 times: C-u 40 C-x e
Naming a macro in Emacs (so you can have multiple) takes even more keystrokes and I'm not entirely sure on the incantation to repeat a macro from name - none of the help files seem to tell me how to do this, only to save it. interface 'a collection {
void sort(lt:'a -> 'a -> bool);
}
So, if you want to use lambdas, you would get: foos.sort(fn x y -> x.bar() > y.bar());
And if you don't want to use lambdas, you would get: bool sort_by_bar_gt(x:Foo, y:Foo) {
return x.bar() > y.bar();
}
foos.sort(sort_by_bar_gt);
And that is assuming you can nest functions, but chances are you will have to put that function somewhere removed from the actual call to sort. This is the exact problem the STL hits: it assumes, for many things, you want a functional style - and then it doesn't give you a way of writing lambdas. You are left with one-off functors littering your code, wishing you could write that lambda. Maybe you like [lambdas], maybe you don't, maybe you think
they're God's gift to programming and any language
without them is an infidel. But adding them would be
harmless, anyway.
Well I agree on this point, it seems like a poor argument. You can't just declare a feature harmless if you ignore it. You make lambdas first-class and you end up baking them into libraries. Now you must use them.
JS/Python/C++ guy. Well versed in d3.js. Have spent past two years doing vertical feature development, focusing on front end, in JS and Python/AppEngine. Spent three years before that doing backend/algorithm C++ work.
Open for flexible work designing/implementing visualizations and frontends.
Site: http://hazzens.com