Comment Comment by twii No, it's not a joke. A junior dev can read this code and it will be very hard to create bugs.Inlining with arrows is just a more functional approach, as I would write in Coffee: exists filename, (fileExists) -> handleFile filename, fileExists Anything wrong with that line of code?I just try very hard to keep my code as simple as possible.I hope you know it's trivial to write a log function that accepts different callees so you end up with only 1 'if (err)'.I didn't test, but I wouldn't be surprised if my example runs times faster as well btw. parent twii 9 years ago
Inlining with arrows is just a more functional approach, as I would write in Coffee:
Anything wrong with that line of code?I just try very hard to keep my code as simple as possible.
I hope you know it's trivial to write a log function that accepts different callees so you end up with only 1 'if (err)'.
I didn't test, but I wouldn't be surprised if my example runs times faster as well btw.