Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #14317
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: RfD: Make ENVIRONMENT? obsolescent |
| Date | 2012-07-23 15:34 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2012Jul23.173411@mips.complang.tuwien.ac.at> (permalink) |
| References | (9 earlier) <jtputo$ftm$1@online.de> <500975fa$0$295$14726298@news.sunsite.dk> <juc7dq$6ul$1@online.de> <5009bf34$0$293$14726298@news.sunsite.dk> <juclkn$lr$1@online.de> |
Bernd Paysan <bernd.paysan@gmx.de> writes:
>Well, please: This is one school of OOP - the duck-type Smalltalk
>school. The other school is trying to tell you that interfaces matter,
>and objects may or may not implement a particular interface, and that
>it's good to have these scopes separated, because otherwise you end up
>with conflicts in your namespace.
No, you end up with conflicts, I don't. I like to choose specific
names, one name for one thing; my names admittedly violate the
commandment "Thou shalt not use hyphens" that is not-quite written in
the holy book ("Thinking Forth"), but then object-oriented programming
is a violation of many principles presented in this book anyway.
An example for names that I remember you giving is DRAW. You wanted
to use that name for two different selectors: for graphical objects
and for guns. My solution to that is to have two different names for
the two selectors (say, DRAW-GRAPHIC and DRAW-GUN), yours is to use
DRAW for both and have a complex overloading resolution implementation
to distinguish between the two.
But if I wanted to have the same name for both, I would use just one
selector that can invoke methods of any class; sure it's a little
slower, but it's much simpler than overloading.
>That's ok if you want only one object system at a time. However, as
>Stephen Pelc noticed, libraries that use OOP techniques come with their
>own OOP system. How to use two of these libraries at once? The OOP
>systems need to coexist.
Apart from name conflicts (and there are solutions for that), I don't
see a problem with loading multiple OOP systems written in standard
Forth at once.
>That's not the goal. The goal is a Lego toolbox of simple bricks to
>build whatever you want to, and still have it fit together with other
>Lego bricks.
It seems to me that Forth is that toolbox.
>E.g. if you decide to have your methods take an object on the stack, and
>I decide to have my methods to use the current object pointer, and I
>call one of your methods, it will (because it is called in my context)
>use the current object pointer. Well, by pushing it to the stack, of
>course (so it's not an expensive operation and it is done at compile-
>time).
You want the system to resolve that automatically? Why? If the stack
effect of his word is ( n object -- r ), why would you call it without
explicitly putting the object on the stack?
Conversely, if I call one of your words (say, FOO) that expect the
object in the current object, I would certainly call it with >O FOO O>
or somesuch.
- 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 2012: http://www.euroforth.org/ef12/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Re: RfD: Make ENVIRONMENT? obsolescent stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-11 06:39 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-11 02:06 -0700
Re: RfD: Make ENVIRONMENT? obsolescent Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-11 04:21 -0500
Re: RfD: Make ENVIRONMENT? obsolescent Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-11 02:39 -0700
Re: RfD: Make ENVIRONMENT? obsolescent Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-11 04:20 -0500
Re: RfD: Make ENVIRONMENT? obsolescent Josh Grams <josh@qualdan.com> - 2012-07-11 20:24 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-12 01:53 -0500
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-12 23:38 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-13 05:29 -0500
Re: RfD: Make ENVIRONMENT? obsolescent "Elizabeth D. Rather" <erather@forth.com> - 2012-07-13 08:27 -1000
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-13 22:45 +0200
Re: RfD: Make ENVIRONMENT? obsolescent "Elizabeth D. Rather" <erather@forth.com> - 2012-07-13 11:11 -1000
Re: RfD: Make ENVIRONMENT? obsolescent Josh Grams <josh@qualdan.com> - 2012-07-13 02:20 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-12 01:33 -0700
Re: RfD: Make ENVIRONMENT? obsolescent stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-12 09:43 +0000
Re: RfD: Make ENVIRONMENT? obsolescent anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-12 16:08 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Josh Grams <josh@qualdan.com> - 2012-07-13 03:12 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-13 05:37 -0500
Re: RfD: Make ENVIRONMENT? obsolescent anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-11 16:23 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-12 23:36 +0200
Re: RfD: Make ENVIRONMENT? obsolescent stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-13 08:16 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-13 05:38 -0500
Re: RfD: Make ENVIRONMENT? obsolescent stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-13 11:36 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-13 09:37 -0500
partitioning words (was: RfD: Make ENVIRONMENT? obsolescent) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-13 16:41 +0000
Re: partitioning words (was: RfD: Make ENVIRONMENT? obsolescent) Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-13 22:31 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-13 22:03 +0200
C interface (was: RfD: Make ENVIRONMENT? obsolescent) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-14 12:55 +0000
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-14 20:45 +0200
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-16 14:34 +0000
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-16 15:24 +0000
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-16 23:18 +0200
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-17 11:33 +0000
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-17 12:05 +0000
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-17 19:08 +0200
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-17 19:14 +0200
time_t Re: C interface Aleksej Saushev <asau@inbox.ru> - 2012-07-20 01:15 +0400
Re: time_t Re: C interface anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-20 15:12 +0000
Re: time_t Re: C interface stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-20 16:04 +0000
Re: time_t Re: C interface Spam@ControlQ.com - 2012-07-20 12:20 -0400
Re: time_t Re: C interface "Elizabeth D. Rather" <erather@forth.com> - 2012-07-20 08:12 -1000
Re: time_t Re: C interface anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-23 15:32 +0000
Re: time_t Re: C interface Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-20 20:22 +0200
Re: time_t Re: C interface Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-20 20:21 +0200
Re: time_t Re: C interface stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-20 19:00 +0000
Re: time_t Re: C interface Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-21 00:21 +0200
Re: time_t Re: C interface Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-21 10:37 +0000
Re: time_t Re: C interface BruceMcF <agila61@netscape.net> - 2012-07-21 15:22 -0700
Re: time_t Re: C interface anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-23 16:23 +0000
Re: time_t Re: C interface BruceMcF <agila61@netscape.net> - 2012-07-20 14:35 -0700
Re: time_t Re: C interface anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-23 15:24 +0000
Re: time_t Re: C interface Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-23 11:03 -0500
Re: time_t Re: C interface Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-23 11:17 -0500
Re: time_t Re: C interface anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-23 17:12 +0000
Re: C interface (was: RfD: Make ENVIRONMENT? obsolescent) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-19 17:10 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-20 11:15 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-20 20:18 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-20 16:27 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-21 00:21 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-20 19:49 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-21 15:42 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-23 21:02 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-23 21:31 -0400
Re: RfD: Make ENVIRONMENT? obsolescent mhx@iae.nl - 2012-07-21 01:18 -0700
Re: RfD: Make ENVIRONMENT? obsolescent Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-21 11:59 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-21 14:43 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-21 19:36 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-21 21:41 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-22 14:13 +0000
Re: RfD: Make ENVIRONMENT? obsolescent mhx@iae.nl (Marcel Hendrix) - 2012-07-22 09:11 +0200
Re: RfD: Make ENVIRONMENT? obsolescent anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-23 15:34 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-23 20:05 +0200
Re: RfD: Make ENVIRONMENT? obsolescent anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-25 12:52 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-25 23:21 +0200
Re: RfD: Make ENVIRONMENT? obsolescent anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-26 14:16 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-27 23:18 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Paul Rubin <no.email@nospam.invalid> - 2012-07-27 16:13 -0700
Re: RfD: Make ENVIRONMENT? obsolescent Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-28 08:21 -0500
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-29 01:07 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-29 07:47 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-30 00:50 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-23 21:10 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-24 13:38 +0200
Re: RfD: Make ENVIRONMENT? obsolescent anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-25 13:58 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-25 23:22 +0200
objects (was: RfD: Make ENVIRONMENT? obsolescent) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-26 14:49 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-26 04:30 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-26 04:48 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-27 23:31 +0200
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-30 04:40 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-21 10:57 +0000
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-23 21:20 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Doug Hoffman <glidedog@gmail.com> - 2012-07-20 11:21 -0400
Re: RfD: Make ENVIRONMENT? obsolescent Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-20 19:48 +0200
csiph-web