[Swift-devel] case sensitivity

Mihael Hategan hategan at mcs.anl.gov
Tue Sep 20 17:29:48 CDT 2011


It's in. r5140. Hopefully working better this time.

On Mon, 2011-09-19 at 21:39 -0700, Mihael Hategan wrote:
> Ooops. Yes. Seems like there's more to this than what I did. I should
> have a fix in tomorrow.
> 
> Mihael
> 
> On Mon, 2011-09-19 at 14:02 -0500, Michael Wilde wrote:
> > I think toInt is broken in trunk.
> > 
> > I just svn up'ed my trunk and cant seem to get any variant of toint() to work. They all give:
> > 
> > fusion$ cat ti.swift
> > int i = @toInt("123");
> > fusion$ swift ti.swift
> > no sites file specified, setting to default: /homes/wilde/swift/src/trunk/cog/modules/swift/dist/swift-svn/etc/sites.xml
> > Could not start execution:
> >         Compile error in assignment at line 2: Unknown function: @toInt:
> >         Unknown function: @toInt
> > fusion$ 
> > 
> > I tried @toint(), @toInt() and toInt().
> > 
> > - Mike
> > 
> > 
> > ----- Original Message -----
> > > From: "Michael Wilde" <wilde at mcs.anl.gov>
> > > To: "Mihael Hategan" <hategan at mcs.anl.gov>
> > > Cc: "Swift Devel" <swift-devel at ci.uchicago.edu>
> > > Sent: Monday, September 19, 2011 11:44:12 AM
> > > Subject: Re: [Swift-devel] case sensitivity
> > > I feel that backwards compatibility - at least for some length period
> > > of time, but better yet indefinitely - needs to take priority over
> > > aesthetic issues.
> > > 
> > > So I can see providing and documenting a function like toInt() while
> > > indefinitely allowing toint(). I agree that we should be consistent is
> > > using camelCase.
> > > 
> > > However, until Yadu's email below I was never aware of any case
> > > insensitivity in Swift - I always programmed as if all names were case
> > > sensitive. I didnt pay close attention to the brief list discussion on
> > > case below. Was there any follow-up discussion?
> > > 
> > > Can you summarize what the issues are?
> > > 
> > > I believe that Swift should be fully case sensitive for all names, and
> > > that we should not cause existing user code to break unless the cost
> > > of such backwards compatibility is much worse than the breakage.
> > > 
> > > - Mike
> > > 
> > > ----- Forwarded Message -----
> > > From: "Yadu Nand" <yadudoc1729 at gmail.com>
> > > To: "Ben Clifford" <benc at hawaga.org.uk>
> > > Cc: "swift-devel" <swift-devel at ci.uchicago.edu>
> > > Sent: Tuesday, August 9, 2011 10:01:22 AM
> > > Subject: Re: [Swift-devel] Overwriting procedures in swift.
> > > 
> > > > what happens with case? (and, what *should* happen with case?)
> > > 
> > > (int o) f ( int i) {
> > > o = i;
> > > }
> > > (int z) F (int a){
> > > z = a * 5 ;
> > > }
> > > trace ( f (5) , F(5) );
> > > 
> > > for the above snippet, trace returns 25, 25.
> > > So F is overwriting f anyway. I don't think this is right.
> > > 
> > > > I think karajan identifiers are case insensitive (?) but this patch
> > > > looks
> > > > like it is case-sensitive.
> > > 
> > > Fixed it. Please check the new patch attached.
> > > 
> > > 
> > > ----- Original Message -----
> > > > From: "Mihael Hategan" <hategan at mcs.anl.gov>
> > > > To: "Swift Devel" <swift-devel at ci.uchicago.edu>
> > > > Sent: Monday, September 19, 2011 11:06:17 AM
> > > > Subject: [Swift-devel] case sensitivity
> > > > Things have now become truly case sensitive in trunk. Which means
> > > > that
> > > > there is a distinction between toint and toInt. I opted for toInt
> > > > for
> > > > now. In any event, your scripts may break if they use the wrong
> > > > capitalization.
> > > >
> > > > We should document this, and, before releasing 0.94, decide on the
> > > > details of the capitalization of various things.
> > > >
> > > > Mihael
> > > >
> > > > _______________________________________________
> > > > Swift-devel mailing list
> > > > Swift-devel at ci.uchicago.edu
> > > > https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
> > > 
> > > --
> > > Michael Wilde
> > > Computation Institute, University of Chicago
> > > Mathematics and Computer Science Division
> > > Argonne National Laboratory
> > > 
> > > _______________________________________________
> > > Swift-devel mailing list
> > > Swift-devel at ci.uchicago.edu
> > > https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
> > 
> 
> 
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel





More information about the Swift-devel mailing list