chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Export a defstruct - Short Version?


From: Bahman Movaqar
Subject: Re: [Chicken-users] Export a defstruct - Short Version?
Date: Sun, 14 Dec 2014 12:15:01 +0330
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

Thanks for the information Christian.

--
Bahman Movaqar

http://BahmanM.com - https://twitter.com/bahman__m
https://github.com/bahmanm - https://gist.github.com/bahmanm
PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)

On 12/14/2014 12:09 PM, Christian Kellermann wrote:
> * Bahman Movaqar <address@hidden> [141213 22:29]:
>> This code obviously doesn't compile because the export list is wrong
>> --if I change the export list to, for example, (make-point) it compiles
>> fine.
>>
>> I'm aware a "defstruct" is basically a shortcut to create a bunch of
>> functions and the standard way to export it is exporting all the
>> functions one by one. Now, I'm wondering if there is an easier/shorter
>> way to do this (something like a wild card)?
> No there isn't. There's a wildcard for exporting all symbols in a
> module, i.e. using a * instead of a symbol list.  For records there's
> no such thing I am afraid. A lot of modules don't export some if
> not all accessors to hide the actual implementation.
>
> So for the time being you need to explicitly export the getters/setters
> and the make- procedure unless you want to provide your own (maybe
> with your application specific checks).



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]