CURL review request

Jacob Carlborg doob at me.com
Wed Aug 24 23:53:27 PDT 2011


On 2011-08-24 20:36, jdrewsen wrote:
>
> One way that may improve this would be to move the static methods
> outside the class and make them into module functions instead.
>
> The drawbacks of this is:
>
> 1, When importing the module there would be more symbols polluting the
> namespace.
>
> 2, We would have to rename from Http.get to a function named HttpGet. We
> cannot call it simply "get" because both Http and Ftp has the get method.
>
> And personally i lige the Http.get syntax better.
>
> Any other suggestions?
>
> /Jonas

You could wrap the free functions in a Curl struct:

Curl.get(...);

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list