[Swift-devel] Re: Few easy questions
Ben Clifford
benc at hawaga.org.uk
Sat Jun 7 09:09:33 CDT 2008
Milena asked me the below questions privately:
On Mon, 2 Jun 2008, Milena Nikolic wrote:
> 1. For COND_EXPR, what can be compared? This covers ==, !=, <, >, <=, >=
> for numeric types I guess. Can other types be compared with == and != ?
Numeric types should have the equality (== and !=) and ordering (< > <=
>=) operators - this should be working now in the codebase.
Strings and booleans should probably also work with the equality (== and
!=) operators.
> 2. In RANGE_EXPR can we have anything else but int? For instance [1.5, 2.5,
> 0.1]?
Any numeric type should work there.
There is a bug related to this, bug 126:
http://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=126
That is a problem in the runtime, that can be fixed separately from
typechecking.
--
More information about the Swift-devel
mailing list