[Swift-devel] numeric type(s) in swift.
Ben Clifford
benc at hawaga.org.uk
Thu Jul 26 09:01:25 CDT 2007
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.
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