[Swift-devel] Updates - Tests

Mihael Hategan hategan at mcs.anl.gov
Thu Jul 14 17:30:29 CDT 2011


On Fri, 2011-07-15 at 03:30 +0530, Yadu Nand wrote:
> On Fri, Jul 15, 2011 at 1:53 AM, Mihael Hategan <hategan at mcs.anl.gov> wrote:
> > On Fri, 2011-07-15 at 01:12 +0530, Yadu Nand wrote:
> >
> >> > If there are things in your code that you feel are hackish (i.e. quick
> >> > solutions that seem shady for production), let's discuss/fix them before
> >> > we do the above.
> >>
> >> Yes!  In org/griphyn/vdl/engine/Karajan.java, the foreachstat function is
> >> mostly hacks. I'm putting in a code paste :  http://ideone.com/yWbwU
> >>
> >
> > It would be helpful if you were more specific (i.e. you could describe
> > each individual problem).
> 
> Ok.
> When we state  foreach value, index in array[5]  I'm trying to match the
> type of array which from the "in" variable type, something like
> int [int] against int [int][string] so that we get the type of the index.
> I think we could do this better with regex and here I'm having to extract
> the array identifier using very bad string matching. Then we find the
> index type and apply it.
> 
> That would be between line number 40 and 75 of the code pasted
> here -> http://ideone.com/yWbwU
> 

Also the <variable> thing. I have a suspicion that you can use a
function on the template to extract the contents of that tag rather than
rendering it to a string and then parsing it again in custom code.

So let me know if you want to fix those issues. They will have to be
fixed sooner or later by somebody.

Mihael




More information about the Swift-devel mailing list