SWOOP idea

From: Roger Levy <roger.levy_at_gmail.com>
Date: Sat, 27 Sep 2008 01:37:30 -0400

What would be really nice is a way of hiding USING by making a sort of typed
VALUE ...
I thought I might try to create that, calling it a HOLDER, but it seems too
hard to do myself.
Example:

[code]

Class Foo
...
End-Class

Foo Holder Bar

: def
   FOO NEW TO BAR
   BAR member @ BAR member ! ;

[/code]

Now BAR would behave like a typed VALUE in that we can store an address into
it with TO, but when called it acts like an object of type FOO. Much better
than constantly calling USING or using slow CALLING/->

What does everyone think?

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Fri Sep 26 2008 - 22:37:50 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 09-Feb-2012. Archive updated nightly.