[Swift-devel] Swift arrays

Lorenzo Pesce lpesce at uchicago.edu
Thu Apr 4 10:47:02 CDT 2013


Let me know when you want to restart trying with the faster branch.

0.94 so far has done well on Beagle (including arrays, readData, with one exception which I think was probably more a case of a waste basket error message problem) 

On Apr 3, 2013, at 10:02 PM, Michael Wilde wrote:

> 
> No problem not fixing it in 0.94.  We should document the state of case-sensitivity though.
> 
> And I hope you can merge the faster branch into trunk as soon as it passes a reasonable test battery.
> 
> And I'm in favor of "normal" case sensitivity ala C and Java. So if faster-branch is already correctly case-sensitive, I'd say there is nothing to fix here.
> 
> - Mike
> 
> 
> ----- Original Message -----
>> From: "Mihael Hategan" <hategan at mcs.anl.gov>
>> To: "Michael Wilde" <wilde at mcs.anl.gov>
>> Cc: "Ketan Maheshwari" <ketancmaheshwari at gmail.com>, "Swift Devel" <swift-devel at ci.uchicago.edu>
>> Sent: Wednesday, April 3, 2013 9:57:39 PM
>> Subject: Re: [Swift-devel] Swift arrays
>> 
>> Seems that you are correct (despite the error message printing the
>> correct type for B): if I say foreach c,..., it finishes fine.
>> 
>> I'm wary of fixing this in 0.94, so that leaves trunk. But then if we
>> merge the faster branch to trunk, that problem won't be there any
>> more
>> since things are case-sensitive there.
>> 
>> Let me know what you think.
>> 
>> Mihael
>> 
>> On Wed, 2013-04-03 at 18:04 -0500, Michael Wilde wrote:
>>> Ketan will explain more, but the problem here seems to be one of
>>> case-insensitive names.
>>> 
>>> In:
>>> 
>>>  foreach b,i in B{
>>> 
>>> b and B seem to be referring to the same variable, hence the
>>> Invalid Path message.
>>> 
>>> I vaguely recall an older discussion about variable name case
>>> sensitivity.  What was the latest implementation decision on that?
>>> 
>>> For example, if I declare a and A as variables, I get an "already
>>> defined" error, but in the case of the implicit variable
>>> declaration of the foreach loop vars, this seems to work
>>> differently.
>>> 
>>> - Mike
>>> 
>>> 
>>> ----- Original Message -----
>>>> From: "Ketan Maheshwari" <ketancmaheshwari at gmail.com>
>>>> To: "Swift Devel" <swift-devel at ci.uchicago.edu>
>>>> Sent: Wednesday, April 3, 2013 4:20:33 PM
>>>> Subject: [Swift-devel] Swift arrays
>>>> 
>>>> 
>>>> 
>>>> Trying to get some arithmetic done over arrays. I was testing a
>>>> simple Swift script as follows:
>>>> 
>>>> 
>>>> 
>>>> int A[] = [1,1,1];
>>>> int B[] = [2,2,2];
>>>> 
>>>> 
>>>> foreach b,i in B{
>>>> tracef("A[%i] is %i.\n",i, A[i]);
>>>> tracef("B[%i] is %i.\n",i, B[i]);
>>>> }
>>>> 
>>>> 
>>>> 
>>>> Progress: time: Wed, 03 Apr 2013 17:18:13 -0400
>>>> A[2] is 1.
>>>> A[0] is 1.
>>>> A[1] is 1.
>>>> Execution failed:
>>>> org.griphyn.vdl.mapping.InvalidPathException: Invalid path ([1])
>>>> for
>>>> B[1]:int = 2 - Closed
>>>> swiftscript:tracef, test.swift, line 6
>>>> 
>>>> 
>>>> Wondering if this should fail and why.
>>>> 
>>>> 
>>>> Thanks,
>>>> --
>>>> Ketan
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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
>> 
>> 
>> 
> _______________________________________________
> 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