Hi Chapel Users --

We wanted to highlight a question that came up recently on a sibling 
thread in hopes of getting feedback from the community.  Perhaps most 
simply, given the following code:

        var i: int(32) = 42;

        foo(i);  // call requires coercion from int to real

        proc foo(x: real(32)) { writeln("In 32-bit version"); }

        proc foo(x: real(64)) { writeln("In 64-bit version"); }

Which of the two calls would you want/expect foo() to dispatch to (if 
either one)?


While this example is fairly arbitrary, note that this has implications 
for things like which math operators are invoked in cases where there is 
no precisely matching signature for the two argument types, such as:

        ...i * 2.5...


We'd appreciate hearing any heartfelt opinions on this topic.  Opinions 
with supporting rationale are particularly appreciated.

Thanks,
-Brad


------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to