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

Mihael Hategan hategan at mcs.anl.gov
Thu Jul 26 10:03:37 CDT 2007


On Thu, 2007-07-26 at 14:01 +0000, Ben Clifford wrote:
> On Tue, 24 Jul 2007, Mihael Hategan wrote:
> 
> > I'm thinking we should have two division operators:
> > div - integer division (int, int -> int)
> > / - floating point division ( [int|float], [int|float] -> float )
> 
> So a patch I have (not yet committed) makes / be floating point division, 
> %/ be integer division and %% be mod (rather than %).
> 
> (the % prefix on %/ and %% because those two operators are strongly 
> related).
> 
> No other particularly nice symbols spring to mind.

'div' and 'mod'?

> 
> With that in place, the operator changes you committed work without too 
> much change to the language both against the XML development stuff and 
> also against the trunk code.
> 
> I'd be happy for those to go into trunk now, ahead of the big XML 
> expression work.
> 




More information about the Swift-devel mailing list