[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] What is the role of standardization in things like FFI?
- To: scheme-reports@x
- Subject: Re: [Scheme-reports] What is the role of standardization in things like FFI?
- From: Ray Dillinger <bear@x>
- Date: Wed, 16 Nov 2011 01:41:53 -0800
- In-reply-to: <CAAjq1mc3xdRrUGBYYP-EeR0U5CftHh=+YKXo+FKBMgdFriN81Q@mail.gmail.com>
- References: <CAAjq1mc3xdRrUGBYYP-EeR0U5CftHh=+YKXo+FKBMgdFriN81Q@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
On 11/15/2011 07:17 PM, Grant Rettke wrote:
> Based on discussions on the wiki it seems that FFI is clearly out of
> scope of the standard because everyone does it differently. That said,
> it is important enough to be discussed in the first place.
> Is the role of the standard simply to recognize it's importance and
> rationale for not finding a common api? Or is the lack of a common api
> simply a reflection of the fact that there is not one?
The problem is not simply that "everyone does it differently."
The problem is that insofar as implementations are different
and the environments upon which they are hosted are different,
there is no possible way for "everyone" to do FFI the same
It is not sensible to suppose that a system where the operating
system runs on top of a JVM ought to do FFI in a way similar to
a system where the operating system runs on raw hardware.
It is not sensible to suppose that a system where it is possible
to have different threads operating in the same memory arena (such
as Windows or Linux) ought to do FFI in the same way as a "secure"
Operating system in which there is no interprocess communication
except serial communication over ports, such as military OS's
based on the Bell-LaPadula model, etc.
It is not sensible to suppose that a system which represents
strings as Tries of UTF-16 character buffers ought to do FFI
regarding strings in the same way as a system that stores
strings as arrays of UTF-8 characters.
Nor is it sensible to suppose that in a computer where the OS
regards text as an array of fixed-length strings with an implicit
linefeed between each string (such as some portable devices) FFI
ought to be done in the same way as in a computer where the OS
regards text as an array of characters and a linefeed is just
another character (such as UNIX).
and so on.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
Scheme-reports mailing list