On Sun, May 18, 2008 at 7:11 AM, john skaller
<[EMAIL PROTECTED]> wrote:
>> And do the declare if the string starts with @. That loses the ability
>> to write arbitrary text.
>
> Not if you change it to
>
>        fun sin: double -> double :@ "sin";
>
> i.e. special syntax which invokes an llvm specific extension.

This was the reason why I was thinking about using scheme, or
s-expressions, or something in the quoted code. We've already got an
excess of syntax in felix, it'd be nice if we could at least hide it
inside the quotes.

>> True, but in many cases llvm can hide this away. LLvm uses load and
>> store only when interacting explicitly with the stack or heap. For
>> something like sin, you can just read and return the value directly.
>> They've even got support now for returning multiple values. In the
>> next release, I believe they're adding support for returning complex
>> data like structures and arrays.
>
> Why bother .. why not use C?

Two things that would be very very difficult if we keep our c++
backend: a repl and debugging hooks. The repl is rather easy. I did
one with the ocaml/llvm tutorial I wrote a couple weeks ago. It'll be
a bit trickier to pull off for felix, of course. Debugging is done
because llvm added DWARF hooks so in the long run, we could use gdb
and etc to step through our code.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to