Calypso and the future of D
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jan 25 16:37:00 PST 2015
On 1/25/2015 3:07 PM, Elie Morisse wrote:
> On Sunday, 25 January 2015 at 22:45:31 UTC, Walter Bright wrote:
>> Not what I meant.
>>
>> What does parse.c have to do with the user of Calypso?
>>
>> How does the user use Calypso? Where is Calypso? How do I run Calypso?
>>
>> A user of Calypso will be baffled when encountering user documentation of
>> Calypso that explains it in terms of dmd internal source code.
>
> Is the new README any better?
No. It doesn't answer any of my questions.
> Once I succeed making the nature of Calypso
> intelligible does the showcase example seem self-explaining enough to make the
> usage straightforward?
I'm obviously terrible at communicating. Let me try again. Assume that I wrote
Calypso, and I was explaining it to you:
-----------------------------------------
Given the C++ header file foo.h:
void bar(unsigned *);
and the C++ source file foo.cpp:
void bar(unsigned *p) { }
I want to call bar() from my D code in test.d:
void main() {
uint x;
bar(&x);
}
Here's how to do it with Calypso:
calypso foo.h
which will generate the file foo.d. add an import to test.d:
import foo;
void main() {
uint x;
bar(&x);
}
To compile and link:
clang++ foo.cpp -c
dmd test foo.o
Which generates the program 'test' which can be run.
More information about the Digitalmars-d
mailing list