[plt-scheme] MzScheme: extending vs. embedding to build a text editor

From: Peter Michaux (petermichaux at gmail.com)
Date: Sun Jul 13 20:50:46 EDT 2008

On Sun, Jul 13, 2008 at 5:03 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Sun, 13 Jul 2008 16:57:12 -0700, "Peter Michaux" wrote:
>> First, I could write MzScheme extensions [1] for ncurses. The editor
>> could then be written in Scheme from start to end whatever that means.
>> It would certainly be a Scheme-centric implementation. I could then
>> edit a file with the command
>>
>>   mzscheme myeditor.ss some-file-to-edit.txt
>
> I would do it this way,

I'm curious why you would do it this way rather than creating a C
program embedded with MzScheme. Is it simply to avoid having to write
any C code?

> but probably using `scheme/foreign' instead of
> creating an extension:
>
>  http://docs.plt-scheme.org/foreign/index.html

Again, is this just to avoid having to write any C code (a wrapper in
this case)? Or is there some other benefit of using an FFI. I've never
used and FFI before.

Thanks,
Peter


Posted on the users mailing list.