|
|
|
|
|
by khendron
1360 days ago
|
|
One of the advantages of functions is that a well-named function is self-documenting. If you can take a bunch of lines and wrap them in a function whose name summarizes exactly what it does, then you have improved readability in my opinion. In this example, I don't really need to know the details of how the query parameters are extracted. I just want to know I've got them. |
|
Maybe not relevant in simple toy examples, but you don't have to look far until to find a function that isn't so easy to name.