Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

All of the peer answers are excellent, here are my $0.02:

As a design principle, it makes sense to use/re-use the capabilities of a component, rather than an agent acting on that primitive. For example, HTML already has a built-in CSS engine that can animate. Re-writing the animation in JavaScript is redundant and adds more code, which means more bugs, more size, more maintenance, etc.

Consider this example in C: using printf("%f", val) versus writing your own convert_float_to_characters_to_stdout(val) function.

There are cases where you may want to do the latter because printf is a very large function for embedded controllers and sometimes excludes format specifiers to save space, especially %f. But normally you just use what you are given rather than re-inventing the wheel.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: