Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #22691
| Newsgroups | comp.lang.forth |
|---|---|
| Date | 2013-05-16 13:37 -0700 |
| Message-ID | <b4066bda-e458-4763-bbd7-446f9f61377f@g9g2000vbl.googlegroups.com> (permalink) |
| Subject | Another OOP thread; everything on the stack is an object |
| From | Alex McDonald <blog@rivadpm.com> |
The "current object" thread and my investigations on a prototype based object model for Forth has led me to think that it should be possible to construct a stack based "everything is an object" language. Assume a stack where each entry is an object (possibly implemented as some form of closure pointer), and where every word (including numbers and strings) are objects that respond to messages/methods. These are also first class objects ala Javascript; the only distinction between an object and a message is the stack effect. For instance 1 DUP can be considered as sending the message DUP to the object 1, leaving two objects 1 1 on the stack. 1 2 + sends the message + to the object 2, which consumes the object 1 and leaves the object 3 on the stack. Or "abcd" "1" + where the message + is sent to the string object "1", producing the object "abcd1". var x \ the object x 10 x ! \ send the store message to X string y "abcd" y ! y length x ! x . \ types 4 A sizable chunk of the resulting language is very Forth-like. Thoughts?
Back to comp.lang.forth | Previous | Next — Next in thread | Find similar
Another OOP thread; everything on the stack is an object Alex McDonald <blog@rivadpm.com> - 2013-05-16 13:37 -0700
Re: Another OOP thread; everything on the stack is an object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-17 00:09 +0200
Re: Another OOP thread; everything on the stack is an object hughaguilar96@yahoo.com - 2013-05-16 18:31 -0700
Re: Another OOP thread; everything on the stack is an object Alex McDonald <blog@rivadpm.com> - 2013-05-17 05:38 -0700
Re: Another OOP thread; everything on the stack is an object Alex McDonald <blog@rivadpm.com> - 2013-05-17 05:39 -0700
Re: Another OOP thread; everything on the stack is an object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-19 00:09 +0200
Re: Another OOP thread; everything on the stack is an object Ian Osgood <iano@quirkster.com> - 2013-05-25 11:36 -0700
Re: Another OOP thread; everything on the stack is an object Paul Rubin <no.email@nospam.invalid> - 2013-05-25 13:10 -0700
Re: Another OOP thread; everything on the stack is an object Ron Aaron <rambamist@gmail.com> - 2013-05-17 08:04 +0300
Re: Another OOP thread; everything on the stack is an object Paul Rubin <no.email@nospam.invalid> - 2013-05-16 22:19 -0700
Re: Another OOP thread; everything on the stack is an object Ron Aaron <rambamist@gmail.com> - 2013-05-17 08:26 +0300
Re: Another OOP thread; everything on the stack is an object Paul Rubin <no.email@nospam.invalid> - 2013-05-16 22:43 -0700
Re: Another OOP thread; everything on the stack is an object Ron Aaron <rambamist@gmail.com> - 2013-05-17 09:25 +0300
Re: Another OOP thread; everything on the stack is an object Mark Wills <markrobertwills@yahoo.co.uk> - 2013-05-17 00:26 -0700
Re: Another OOP thread; everything on the stack is an object anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-05-17 13:25 +0000
Re: Another OOP thread; everything on the stack is an object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-19 00:34 +0200
Re: Another OOP thread; everything on the stack is an object visualforth@rocketmail.com - 2013-05-18 15:55 -0700
Re: Another OOP thread; everything on the stack is an object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-19 01:27 +0200
Re: Another OOP thread; everything on the stack is an object Coos Haak <chforth@hccnet.nl> - 2013-05-19 01:35 +0200
Re: Another OOP thread; everything on the stack is an object Mark Wills <markrobertwills@yahoo.co.uk> - 2013-05-17 00:29 -0700
Re: Another OOP thread; everything on the stack is an object hughaguilar96@yahoo.com - 2013-05-18 19:38 -0700
Re: Another OOP thread; everything on the stack is an object Alex McDonald <blog@rivadpm.com> - 2013-05-17 05:40 -0700
Re: Another OOP thread; everything on the stack is an object Ron Aaron <rambamist@gmail.com> - 2013-05-17 16:18 +0300
Re: Another OOP thread; everything on the stack is an object anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-05-17 12:50 +0000
Re: Another OOP thread; everything on the stack is an object Paul Rubin <no.email@nospam.invalid> - 2013-05-17 06:09 -0700
Re: Another OOP thread; everything on the stack is an object Ron Aaron <rambamist@gmail.com> - 2013-05-17 16:25 +0300
Re: Another OOP thread; everything on the stack is an object alberto@hal-pc.org (Alberto) - 2013-05-17 14:35 +0000
Re: Another OOP thread; everything on the stack is an object Steve <nospam275@gmail.com> - 2013-05-19 05:48 -0700
Re: Another OOP thread; everything on the stack is an object Jason Damisch <jasondamisch@yahoo.com> - 2013-05-25 19:56 -0700
csiph-web