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

For this particular case it's trivial to fix substring function and extend possible inputs. It seems your proposition: "do nothing because it's futile". It's simply wrong.


Will that make the function more useful?

In general you can write better code when you can make assumptions.

Code to handle every possibility is filled with error prone branching, that reduplicates effort at every function.


It would reduce number of assumptions, especially ones laying only in your head. Generally it's a good thing, isn't it? Literally large portion of C code bugs is due to broken assumptions. WTF man?




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

Search: