[rust-dev] Functions overloading

Alexander Stavonin a.stavonin at gmail.com
Thu Apr 12 22:19:41 PDT 2012


I suppose this style is less confused.

    foo(i(10));
    foo(s("test"));

than this one, at least for passing parameters to a function.

    10.foo();
    "test".foo();


13 апреля 2012 г. 14:00 пользователь Niko Matsakis <niko at alum.mit.edu>написал:

> On 4/12/12 9:30 PM, Alexander Stavonin wrote:
>
>> The closest variant can be implemented by using enums, but I can't say
>> that resulted code is nice.:
>>
>
> What is wrong with the impl-based technique I suggested?
>
>
> Niko
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20120413/39ba84da/attachment.html>


More information about the Rust-dev mailing list