initializing slot 
Author Message
 initializing slot

-----BEGIN PGP SIGNED MESSAGE-----

Hi!

Do you know an easier way to do the following?

define class <some-class> (<object>)
    slot some-slot :: <my-type>, init-function: curry(make,<my-type>);
end class;

The DRM tells something about an init expression (which would be
make(<my-type>) in this case), but it doesn't tell what the keyword
for that is. I'd expect something like:

define class <some-class> (<object>)
    slot some-slot :: <my-type>, init-expression: make(<my-type>);
end class;

to work, but it doesn't with mindy 1.4.

Andreas

- --
Kallisti!

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAgUBMZeYlEyjTSyISdw9AQEfQAP/cczuA6kVA/DBhhBAuXL9bp+jX+ZIDYcD
a0Yipa2cj0olVv9dCbmilDhfYrSBh4bgkMWf9n2cym/VOyJ+L0znEtvpaj7qrDsk
hMKiH5x6rT07UwSPVCa/4mzDfHSmqC6IhA1wxxplp86XS4N0wfhfjKIial2cxoha
kCeati7bC0s=
=NOcw
-----END PGP SIGNATURE-----



Fri, 30 Oct 1998 03:00:00 GMT  
 initializing slot

Quote:

>The DRM tells something about an init expression (which would be
>make(<my-type>) in this case), but it doesn't tell what the keyword
>for that is.

It's not a keyword.  You use = to do it.  Example:

    slot some-slot :: <my-type> = make(<my-type>);

Init-exprs aren't supported in Mindy 1.4, but they are in 1.5 (coming
RSN).
--

-Nick Kramer



Sun, 01 Nov 1998 03:00:00 GMT  
 initializing slot


Quote:

> Do you know an easier way to do the following?

> define class <some-class> (<object>)
>     slot some-slot :: <my-type>, init-function: curry(make,<my-type>);
> end class;

define class <some-class> (<object>)
    slot some-slot :: <my-type> = make(<my-type>);
end class;
--Dave Moon


Sun, 01 Nov 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. changing slots in an overloaded initialize-instance, and type checking

2. Structure slot-init accessing previous slot

3. Slots of a slot definition metaobject

4. C extension tp_getattr slot: structmember interface; new tp_* slots

5. Reading the PC-Card Slots

6. SLOT

7. float slot in Win32forth

8. PCI slot

9. Proposal: Robots with CD-ROM brain slot

10. many slots in realtime

11. How to build a Slot Machine in MMLogic?

 

 
Powered by phpBB® Forum Software