I create a "wrapper" function around the make object! declaration to create
an instance of the "class", then call this wrapper function explicitly when
I want a new instance. This wrapper function does the initialization and
such of a constructor. If you cared, you could also write a function for the
destructor, and call it explicitly. Alas, these are not "true oo"
constructors and destructors as they are not elements of the object, but
they work.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 21, 2000 4:17 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] constructor & destructor


Since I've programmed sometime i C++ with classes (almost like objects in
REBOL), I've missed some features in the objects in REBOL.

What about constructors (a member function that is executed at object
creation) and destructors (a member function that is executed at object
deletion)?

1. Will it be added to REBOL?

2. How can it be made with current implementation of REBOL?

Yours faithfully
---
Martin Ancher Holm
Work <[EMAIL PROTECTED]>, Home <[EMAIL PROTECTED]>
<http://wwww.dk>,    Cell <[EMAIL PROTECTED]>

Reply via email to