Difference between revisions of "Talk:EiffelBase2"

(Added a question about index of the first item in SPECIAL)
 
m (Added a note to extend functionality of iterators.)
Line 1: Line 1:
 
'''[[User:Alexander Kogtenkov|Alexander Kogtenkov]] 17:51, 23 April 2010 (UTC):'''
 
'''[[User:Alexander Kogtenkov|Alexander Kogtenkov]] 17:51, 23 April 2010 (UTC):'''
 
Changing indexable structures to use 1 everywhere for lower index looks like a good idea. The summary mentions the corresponding modification to the class <e>ARRAY</e>. There is one more class that does not fit "start at 1" rule: <e>SPECIAL</e>. Is it planned to change it to start at 1 as well?
 
Changing indexable structures to use 1 everywhere for lower index looks like a good idea. The summary mentions the corresponding modification to the class <e>ARRAY</e>. There is one more class that does not fit "start at 1" rule: <e>SPECIAL</e>. Is it planned to change it to start at 1 as well?
 +
 +
'''[[User:Alexander Kogtenkov|Alexander Kogtenkov]] 14:01, 5 April 2012 (UTC):'''
 +
An iterator is usually seen as a passive handle that can be operated by some other code to access elements in turn. On the other hand it's natural to provide <e>do_all</e> and similar iteration features when the code to process elements is wrapped in agents. Yet it might be reasonable to have an abstraction that has an iterative behaviour by itself. It would define a feature <e>forth</e> to do some work and the loop that performs the iteration would be provided by the higher-level iterator-like class. Are there any provisions for such applications?

Revision as of 06:01, 5 April 2012

Alexander Kogtenkov 17:51, 23 April 2010 (UTC): Changing indexable structures to use 1 everywhere for lower index looks like a good idea. The summary mentions the corresponding modification to the class ARRAY. There is one more class that does not fit "start at 1" rule: SPECIAL. Is it planned to change it to start at 1 as well?

Alexander Kogtenkov 14:01, 5 April 2012 (UTC): An iterator is usually seen as a passive handle that can be operated by some other code to access elements in turn. On the other hand it's natural to provide do_all and similar iteration features when the code to process elements is wrapped in agents. Yet it might be reasonable to have an abstraction that has an iterative behaviour by itself. It would define a feature forth to do some work and the loop that performs the iteration would be provided by the higher-level iterator-like class. Are there any provisions for such applications?