[rust-dev] 2 possible simplifications: reverse application, records as arguments

Joe Groff arcata at gmail.com
Mon Apr 23 10:45:37 PDT 2012


On Apr 23, 2012, at 8:34 AM, Patrick Walton <pwalton at mozilla.com> wrote:

>
> * We'd still need formal parameters for C interoperability. At the ABI level, a single-argument function applied to a 3-ary tuple is very different from a function with 3 arguments.

Could the rust calling convention behave similarly to the x86-64
convention, where small composite types are destructured when passed
by value?

> * It prohibits us from having optional parameters in the future (at least, not without some very hairy type checking.

Why would optional parameters need to be any more complicated than
either C++-style default values or option-typed slots?

-Joe


More information about the Rust-dev mailing list