Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #11822

Re: Message-not-understood and stack effects

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Message-not-understood and stack effects
Date 2012-05-02 12:23 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2012May2.142342@mips.complang.tuwien.ac.at> (permalink)
References (4 earlier) <8563e117-d9ef-462b-bb65-2acacb6e9139@r32g2000yqj.googlegroups.com> <jnkrec$96o$1@speranza.aioe.org> <9d0c8e14-61ee-446d-8992-c57eb3ce2bbc@h5g2000vbx.googlegroups.com> <jnqv4f$3jo$1@speranza.aioe.org> <svudneCcUr0fhzzSnZ2dnUVZ_uqdnZ2d@supernews.com>

Show all headers | View raw


Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>To recap: Anton is considering a scheme where, if you call a method
>that expects a singular object on, say, an array, the system (or the
>array) automagically inserts a "forEach" loop and calls the method
>once with each element.  I think that's a terrible idea: if you want a
>loop, I think you should say so.

Did I express myself so misleadingly?  The programmer for the
collection class would write a loop in the NOT-UNDERSTOOD method, or
he would decide not to define this method in this way.  And the
programmer of code that uses a collection class would select a
collection class with that feature if that feature is desired, or a
collection class without that feature if it is not desired.

If that does not satisfy your notion of "say so", what does.  Should
the users of the collection class then have to create another
collection class, and define various methods for them, each looking
like:

:: draw ['] draw this foreach ;;

Does that gain anything?

(The programmer might write something like this anyway, because of the
stack effects issues, or because of efficiency considerations)

And what's the difference from the proxy case?  If it is good to be
forced to write such methods for collections and bad not to be forced
to do this, why wouldn't it also be good to be forced to write methods
like

:: draw ['] draw this doproxy ;;

for proxies; then we would not need NOT-UNDERSTOOD at all, and we
would be more explicit.

Anyway, I had understood that you and John Passaniti don't think it's
a good idea, but failed to see the reasoning, and the (according to
you) "reductio-ad-absurdum" posting did not do anything to change that
situation.

The funny thing about that posting is that, if it was intended to
demonstrate that one cannot productively discuss technical issues
concerning features that one considers a bad idea, it failed.  On the
contrary, it demonstrated that one can.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2011: http://www.euroforth.org/ef11/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-17 13:16 +0000
  Re: Message-not-understood and stack effects "A. K." <akk@nospam.org> - 2012-04-17 18:20 +0200
    Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-17 16:37 +0000
      Re: Message-not-understood and stack effects vandys@vsta.org - 2012-04-17 17:43 +0000
      Re: Message-not-understood and stack effects Alex McDonald <blog@rivadpm.com> - 2012-04-17 10:40 -0700
  Re: Message-not-understood and stack effects Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-17 12:41 -0500
    Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-18 09:48 +0000
      Re: Message-not-understood and stack effects Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-18 05:59 -0500
        Re: Message-not-understood and stack effects John Passaniti <john.passaniti@gmail.com> - 2012-04-18 08:52 -0700
        Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-19 11:47 +0000
          Re: Message-not-understood and stack effects Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-19 07:50 -0500
            Re: Message-not-understood and stack effects John Passaniti <john.passaniti@gmail.com> - 2012-04-19 07:14 -0700
              Re: Message-not-understood and stack effects Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-19 09:31 -0500
            Re: Message-not-understood and stack effects Bernd Paysan <bernd.paysan@gmx.de> - 2012-04-19 19:31 +0200
            Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-20 10:17 +0000
              Re: Message-not-understood and stack effects John Passaniti <john.passaniti@gmail.com> - 2012-04-20 07:52 -0700
                Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-20 15:26 +0000
                Re: Message-not-understood and stack effects John Passaniti <john.passaniti@gmail.com> - 2012-04-24 06:09 -0700
                Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-24 16:52 +0000
                Re: Message-not-understood and stack effects John Passaniti <john.passaniti@gmail.com> - 2012-04-28 18:38 -0700
                Re: Message-not-understood and stack effects "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-04-29 00:19 -0400
                Re: Message-not-understood and stack effects John Passaniti <john.passaniti@gmail.com> - 2012-04-29 11:16 -0700
                Re: Message-not-understood and stack effects "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-04-29 21:55 -0400
                Re: Message-not-understood and stack effects John Passaniti <john.passaniti@gmail.com> - 2012-05-01 14:44 -0700
                Re: Message-not-understood and stack effects "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-05-02 05:35 -0400
                Re: Message-not-understood and stack effects Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-02 06:29 -0500
                Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-02 12:23 +0000
                Re: Message-not-understood and stack effects Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-02 08:43 -0500
                Re: Message-not-understood and stack effects Doug Hoffman <glidedog@gmail.com> - 2012-05-02 11:06 -0400
                Re: Message-not-understood and stack effects Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-03 18:41 +0200
                Re: Message-not-understood and stack effects Doug Hoffman <glidedog@gmail.com> - 2012-05-03 13:07 -0400
                Re: Message-not-understood and stack effects Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-04 02:46 +0200
                Re: Message-not-understood and stack effects Doug Hoffman <glidedog@gmail.com> - 2012-05-03 22:09 -0400
                Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-03 09:14 +0000
                Re: Message-not-understood and stack effects Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-03 04:33 -0500
                Re: Message-not-understood and stack effects Mark Wills <markrobertwills@yahoo.co.uk> - 2012-05-02 12:58 -0700
                Re: Message-not-understood and stack effects vandys@vsta.org - 2012-05-02 20:43 +0000
                Re: Message-not-understood and stack effects Mark Wills <markrobertwills@yahoo.co.uk> - 2012-05-02 13:48 -0700
                Re: Message-not-understood and stack effects John Passaniti <john.passaniti@gmail.com> - 2012-05-03 10:42 -0700
                TypoForth (was: Message-not-understood and stack effects) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-30 13:47 +0000
                Re: TypoForth (was: Message-not-understood and stack effects) BruceMcF <agila61@netscape.net> - 2012-04-30 08:38 -0700
                Re: TypoForth (was: Message-not-understood and stack effects) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-30 16:23 +0000
                Re: TypoForth (was: Message-not-understood and stack effects) BruceMcF <agila61@netscape.net> - 2012-04-30 09:41 -0700
                Re: TypoForth (was: Message-not-understood and stack effects) John Passaniti <john.passaniti@gmail.com> - 2012-05-01 14:53 -0700
  Re: Message-not-understood and stack effects anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-21 12:34 +0000

csiph-web