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 25 Oct 2004 08:10:01 PM UTC  
 
Should Start On: Mon 25 Oct 2004 12:00:00 AM UTCShould be Finished on: Mon 25 Oct 2004 12:00:00 AM UTC
Category: CompilerPriority: 1 - Later
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: OpenEffort: 0.00

Mon 25 Oct 2004 08:10:01 PM UTC, 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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup