Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Simpler iterators with yield
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 11th November 22:44
franck
External User
 
Posts: 1
Default Simpler iterators with yield


Dr Chaos:

So do agents with list map/fold/app etc. Aren't sather
iterators made redundant by higher order functions?
  Reply With Quote


  sponsored links


2 16th November 15:10
dr chaos
External User
 
Posts: 1
Default Simpler iterators with yield


I don't think they are completely

No, not really. The semantics are somehwat different: iters really
are about better sequential iteration. Applying a function to results
of another function is usually parallel operation: e.g. find all
elements satisfying P1, then apply function F. (this is an example of
what I assume you mean).

In an iter, its arguments can be "hot", meaning recomputed for
each new iteration. This precludes a simple parallel.

They are both useful and should coexist, but I think iters satisfy
a more frequent need in traditional imperative programming.
  Reply With Quote
3 24th November 10:44
gabriel moreau
External User
 
Posts: 1
Default Simpler iterators with yield


I am 100% agree with you. Sather iter are the best way for loop. I don't
understand why no other language have done the same. Very easy to code
and use, no bug and you are free to do what you want.

gaby
--
Gabriel Moreau - IR CNRS tel:+33.476.827.011
Laboratoire 3S, Sols Solides Structures fax:+33.476.827.043
BP53, 38041 Grenoble Cedex, France http://www.3s.hmg.inpg.fr
mailto:Gabriel.Moreau@univ-ubs.fr mailto:Gabriel.Moreau@hmg.inpg.fr
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666