"M�rio Amado Alves" wrote in message news:4a4de33a.0306060256.52b12d70@posting.google.com... > > IMO one should first add a new set of types: "index" types. (Dmitry) > > Maybe *every* 'conceptual' type should be in the type system. > A la Smalltalk. > This includes exceptions (cf. AE'2001) and, yes, ranges. > It always bugged me what is the 'return type' of the Range attribute. > I think it's the only attribute that does not return a type proper. > Even exceptions and tags have their 'surrogates' in the type system. > I can see "I .. J" as sugar for "Range (From => I, To => J)". > ".." as an operator! This would dovetail nicely with the idea of an Ada iterator schemes. The "range" object could encapsulate the notion of an oredered list of values. Each Range object would a 'First element and a 'Last element, as well as the 'Succ / 'Pred functions to move forward / backward through the values in the range. If Ada 200X had a range object, it would be nice to be able to define the "in" operator for it. Moreover, it would be great if the "for" loop could work with range objects, i.e. for I in Range_Object loop ... end loop; would execute the loop body with I set to each value in Range_Object, visited in Forward order, starting at 'First and ending with 'Last. Similarly for I in reverse Range_Object loop ... end loop; would visit the values in Range_Objec in reverse order, i.e. starting with 'Last, then moving towards 'First using the 'Pred function. > But this be too much to prepare for Ada 200Y :-( > Ada 20XX maybe, if we're still around :-) I plan to live to be 100, although I might not be programming at that time.