taskThe Nosica programming language - Tasks: task #978, implements foreach for containers

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

task #978: implements foreach for containers

Submitted by:  David Jobet <djobet>
Submitted on:  Mon Oct 25 20:10:01 2004  
 
Should Start On: Mon Oct 25 00:00:00 2004Should be Finished on: Mon Oct 25 00:00:00 2004
Category: CompilerPriority: 1 - Later
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: OpenEffort: 0.00

Mon Oct 25 20:10:01 2004, original submission:

a foreach loop to allow iteration easily over containers.
The syntax should be like :

foreach (TypeName var 'in' Expression)
{
}

For example :
Vector<int> v = createVector();
foreach (int i in v)
{
// ...
}

Should only Iterable containers be handled by this construct ?
That is, should Vector class implements Iterable interface to be allowed to be recognized ?

interface Iterable
{
Iterator iterate();
}

Different approach exists :
- Iterable interface (returns an Iterator)
- lambda function passed to foreach method

Of course I prefer oo like constructs, but we should be able to do the second form later with continuations ...

David Jobet <djobet>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by djobet (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup