Computer Science Canada

Associated Arrays?

Author:  andrew. [ Mon Apr 13, 2009 8:45 pm ]
Post subject:  Associated Arrays?

Hey guys,

I was just wondering if it is possible to have associated arrays in Turing.

Thanks,
Andrew

Author:  DemonWasp [ Mon Apr 13, 2009 8:49 pm ]
Post subject:  RE:Associated Arrays?

Associated arrays meaning two arrays of the same length, holding various data corresponding to a series of objects? Yeah, of course.

But it's better to use type and record.

Author:  andrew. [ Mon Apr 13, 2009 8:51 pm ]
Post subject:  RE:Associated Arrays?

That's what I mean. Yeah, I've used both type and record before, but they don't seem as good as the associated arrays I've been reading about.

Author:  Tony [ Mon Apr 13, 2009 8:56 pm ]
Post subject:  RE:Associated Arrays?

uhh... parallel arrays are an anti-pattern (that is, an example of something that you shouldn't be doing).


: