From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f891f,24f3e624c148455d X-Google-Attributes: gidf891f,public X-Google-Thread: 103376,1d321b3a6b8bcab2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-25 17:13:33 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!gatech!howland.reston.ans.net!spool.mu.edu!olivea!charnel.ecst.csuchico.edu!csusac!csus.edu!dick From: dick@silicon.csci.csusb.edu (Dr. Richard Botting) Newsgroups: comp.lang.ada,comp.lang.misc Subject: Re: "Subtract C, add Ada" Followup-To: comp.lang.misc Date: 26 Jan 1995 01:13:33 GMT Organization: CS Dept., Calif. State Univ., San Bernardino Distribution: world Message-ID: <3g6svt$mqo@news.csus.edu> References: <3fv6lb$f4u@oahu.cs.ucla.edu> <3g1j4t$g8a@network.ucsd.edu> <3g609q$t4t@watnews1.watson.ibm.com> NNTP-Posting-Host: dick%@blaze.csci.csusb.edu X-Newsreader: TIN [version 1.2 PL2] Xref: nntp.gmd.de comp.lang.ada:18334 comp.lang.misc:10538 Date: 1995-01-26T01:13:33+00:00 List-Id: Norman H. Cohen (ncohen@watson.ibm.com) wrote: : |> Real iterations in real problems come in many forms. You need a : |> user-progammable construction that goes straight to the problem. : |> C++ types 'iterators' are a good first step, but I don't feel : |> super comfortable with them. What I think is even better is : |> Sather's "iters". Instead of arguing over silly little details : |> of various Pascal or C control structures or whatever their trivial : |> variations, we should desire something much better and powerful among : |> all the inventions that have been occured over the last 20 years. : I think CLU, circa 1979, still holds the prize for the best iteration : abstraction. Well I just have to point out that iterators in Ada date back to January 1983 - "Studies in Ada Style" 2nd Eddition, By Hibbard,Hisgen,Rosenberg,shaw,sherman, Pub Springer Verlag..... Also: I agree that programming language loops are a special and restricted kind of itterator (in some sense or other), But, for me, iterators are a speical and restrictive case of a cooperating sequential processes... as are Ada Tasks, UNIX/C pipes, JSP inverted code/semin-co-routines, etc. (Yes, I have seen the C++ co-routine class library, :-( ) It would be so nice to write code like this int next(void) { .... release(c); ..... release(d); ... if(something) release(x); ... while(somcond){ release(c); make_next(&c); } release(EOF); } And, whenever you called 'next(...)' it finds/computes/fudges up the next char until your get the the end and it pops out the EOF.... This is easy to fake, but I would like it in my languages. The word RELEASE is from the COBOL sorting.... so why can't C++ keep up with COBOL? :-)} -- EMail: dick@csci.csusb.edu=rbotting@wiley.csusb.edu. ftp://ftp.csci.csusb.edu/dick WWW Disclaimer::=`CSUSB may or may not agree with this message`. Copyright(1995)::=`Copy as long as you include this copyright and signature`.