[Swift-devel] numeric type(s) in swift.

Mike Wilde wilde at mcs.anl.gov
Fri Jul 20 10:12:17 CDT 2007


Can we leave things as they are for the moment and come back to this when we 
have more concrete examples?

I certainly see the need to:

a) describe atomic functions that have numeric args

b) do minor calculations on those args, in swift, between calls

How we do b) will be strongly affected by where we go in the "fold" issue, so 
lets gather some app examples to drive this decision.

Seems like we can always do (b) in another language, so we can always "get by" 
by having all args be strings for the moment.  Not pretty, but it lowers the 
urgency of an immediate decision.

I think also that at some point we'll need to reconcile whether we support all 
(or more) of the primitive data types of XML Schema, which has more numeric and 
date types.

Is there any app-based request in bugzilla right now that demands a more 
immediate resolution of this issue?

Yong, can you post the example you had of using a float as an arg?  Did you do 
any swift calculates on those float values in this example?

Thanks,

Mike


Yong Zhao wrote, On 7/20/2007 9:32 AM:
> I've used float. I think the problem is on the contrary that int and float
> may not be enough, we may need more numeric types.
> 
> The issues we are having now is just we need a vdl library to deal with
> numeric operations, instead of relying on karajan (karajan only has double
> type, which is not good for cases when we only need int).
> 
> I'd suggust we understand real user requirements before jumping into
> solutions.
> 
> Yong.
> 
> On Fri, 20 Jul 2007, Ben Clifford wrote:
> 
>>
>> On Mon, 16 Jul 2007, Ben Clifford wrote:
>>
>>> However, now that I look at implementing those, it makes me wonder if we
>>> should have a single numeric type. Its not clear that we need float/double
>>> in the language as distinct types.
>> does any one have any particular preferences for numeric types?
>>
>> In particular has anyone used anything other than 'int' for anything?
>>
>> --
>> _______________________________________________
>> Swift-devel mailing list
>> Swift-devel at ci.uchicago.edu
>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> 
> 

-- 
Mike Wilde
Computation Institute, University of Chicago
Math & Computer Science Division
Argonne National Laboratory
Argonne, IL   60439    USA
tel 630-252-7497 fax 630-252-1997



More information about the Swift-devel mailing list