3 ms·
We should probably aim higher than "not a ghetto" :) I didn't read the article in great detail, but I noticed this: it provides many ways to do the same thi
by chrisbroadfoot 16y ago
We should probably aim higher than "not a ghetto" :)
I didn't read the article in great detail, but I noticed this:
it provides many ways to do the same thing for programmer convenience
This is not a good thing, in my opinion.
I do, however, find it peculiar that utilities like RSS, FTP and mail handling are included in a stdlib.
- 124816 16y ago> This is not a good thing, in my opinion. This is extremely common, and not at all unique to Ruby. For example, providing defaults for parameters is perhaps the most common and simplest form of this. Whenever a library is used by wildly different clients, there is a good chance the API it chooses will be better suited to one or the other. The same Net::HTTP is presumably used for the simplest of uses, maybe 5 line download scripts, and the most complex of cases, perhaps forwarding http requests with all headers intact. In general I go by "minimal, but complete"; but for widely used libraries that have clients of very different complexities, it makes sense to provide a simple API for convenience. I'd rather not be specifying the client headers, user agent, supported encodings, etc, etc each time I want to fetch a file over http.
- Argorak 16y agoI think the point here is: Net::HTTP has convenince methods to just "fire off a GET request" as well as the ability to hand-craft a request and send it over a pre-established connection (maybe implemented by myself).