The new release and more on Types

  • Feb 15, 2013
I've spent more time thinking about what to do about types. I've zeroed in on what I think are the two main points that whatever changes I make need to address. First, I need to indicate what methods you can expect on your loop variable. As I mentioned last week, this should indicate what base type you have access to and also what common user methods the array items share. This seems to be the biggest change in terms of the interface. It will be the part that first exposes the implicit interfaces, so its important that it makes sense and isn't cluttered. The second point is making an array outside of a loop. If you make an array outside of a loop, and then want to access a single member of it, you have to create a variable and then grab an item of the array by index. Unfortunately, since the type of the array is my new ArrayVar class, this doesn't work. There either needs to be a more descriptive name of the array so the user can make their variable of that type, or variables need to be of a more general type. I'm in favor of making the variables a more general type since that would be in the same vein as the implicit interfaces and it would avoid the issue of how to represent ArrayVariable types in the type selection dialog. It would be fairly complicated though, because you would need to allow the variable to have only the methods that all the things it ever contains in that scope. I don't think there exists an easy solution to the problem, and it will be the major thing I work on next week.


  • No comments yet

Log In or Sign Up to leave a comment.