caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Automatic wrapper generator
Date: 23 May 2004 02:14:04 +1000	[thread overview]
Message-ID: <1085242444.6065.51.camel@pelican.wigram> (raw)
In-Reply-To: <1085235588.32267.78.camel@qrnik>

On Sun, 2004-05-23 at 00:19, Marcin 'Qrczak' Kowalczyk wrote:


> Unfortunately in my case it has two problems:
> 
> 1. My compiler doesn't produce as optimized code as it could. It's not
>    that bad, but dynamic typing make generating good code very hard.

> It would be interesting to try to make some universal C binding for my
> language (after macros). I'm leaving considering it for the future.

What I think you will have to do is what I'm doing now
with Felix. YOu actually commit to writing the bindings
in your language. You make sure you can make them work.

Then, you examine what would make it possible
for the compiler to generate better code and extend
your language to handle it.

For example, Felix has a specialised 
'domain specific sublanguage' which deals with C bindings.
There is a whole class of statements which do nothing
else than organise C interfacing.

In your case, you might consiser a DSSL which has
some static typing, just to deal with FFIs ..
but which is higher level than C, and interfaces
with the rest of your language.

I think you can do this by saying 'we have many objects
at the moment, all the same static type -- my language
isn't typeless, just monotyped'.

Ok, so add a type system with two types: native and foreign.
You can't lose any dynamics here, since they're embodied
in the native part already. Just a thought. I worked
on statically typing Python .. and it turned out to be
almost impossible but *only* because of a few nasty
language features 99% of all Python programs could do without
(unrestricted 'eval' and mutable modules being two such evils).

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-05-22 16:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-18  8:38 skaller
2004-05-18  8:58 ` Richard Jones
2004-05-18 10:07   ` skaller
2004-05-18  9:06 ` Basile Starynkevitch local
2004-05-18 10:25   ` skaller
2004-05-18 12:11     ` Richard Jones
2004-05-18 17:21       ` Michael Hamburg
2004-05-18 18:34         ` skaller
2004-05-18 19:27           ` Richard Jones
2004-05-18 20:52             ` skaller
2004-05-18 20:02       ` Gerd Stolpmann
2004-05-18 20:10         ` [Caml-list] Functional critical section SWAMPY
2004-05-18 20:31           ` Kenneth Knowles
2004-05-18 20:39           ` Evan Martin
2004-05-19  7:35             ` thornber
2004-05-19  7:33           ` thornber
2004-05-18  9:25 ` [Caml-list] Automatic wrapper generator Olivier Andrieu
2004-05-18 10:36   ` skaller
2004-05-18  9:38 ` Fermin Reig
2004-05-18 10:42   ` skaller
2004-05-18 10:57     ` Felix Winkelmann
2004-05-18 10:58     ` John Chu
2004-05-18 11:33       ` skaller
2004-05-22 10:09 ` Marcin 'Qrczak' Kowalczyk
2004-05-22 13:13   ` skaller
2004-05-22 14:19     ` Marcin 'Qrczak' Kowalczyk
2004-05-22 16:14       ` skaller [this message]
2004-05-23 10:58         ` Marcin 'Qrczak' Kowalczyk
2004-05-23 19:59           ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1085242444.6065.51.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@inria.fr \
    --cc=qrczak@knm.org.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).