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

There is a simple but fundamental observation that many experienced software engineers discover sooner or later: Reading/understanding code is much more difficult than writing it.

Because of that, programming languages should be designed to make the reading part as easy as possible.

What is the point of those high-level abstract features if they make reading/understanding the code too difficult?



But this feature makes reading code easier? It allows library authors to absorb the complexity into themselves, allowing them to present easier and more convenient APIs for the users of those libraries. Because programs that consume libraries outnumber the libraries themselves, that results in a net reduction in complexity.


I disagree that this makes reading code easier. It is tremendously more complex to understand a generic API precisely because it is generic - it must cater to a huge variety of use cases, and consequently has more nuts and bolts, and knobs to turn.

Now this can be the right choice in many situations, when the higher cost in understanding the API is amortized over a larger number of uses. But in general I much prefer simple and specialized APIs and don't see much of a need for genericity. This includes error handling and resource allocation.


Because there's no correct level of abstraction. There's only appropriate abstractions for different situations.


Maybe there are incorrect situations, though.




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

Search: