On Thu, Jun 01, 2000 at 03:34:10PM +1000, Manuel M. T. Chakravarty wrote:
> Antti-Juhani Kaijanaho <[EMAIL PROTECTED]> wrote,
> 
> > On Wed, May 31, 2000 at 12:06:00PM +1000, Manuel M. T. Chakravarty wrote:
> > > The one hole I am most concerned about is
> > > access to standard OS services and code written in other
> > > languages
> > 
> > FWIW, C has the same problem, and yet n+1 programmers are happy with C
> > (and its descendants).
> 
> Why do you think, C has the same problem?

Like there is no way in Haskell 98 to access OS services beyond a certain
subset, there is no way in C90 or C99 to access OS services beyond a
certain subset.  Haskell's subset is actually larger than C's.

Like Haskell, C has no provisions for accessing code written in other
languages.

In both languages, if you want to access OS services beyond the
standardized subset, or if you want to access code written in other
languages, you need to go beyond the standard and use some things that
make your programs a little more unportable.

> In C, it is dead
> easy to access all OS services, because the standard API of
> most OSs is written in C anyway.

*Specified* in C.  AFAIK on many OS the actual call sequence for system
calls is not the usual C subroutine call sequence.

For example, on Linux on IA32, system calls are INT's, not CALL's.
That means that you cannot access the system calls in C without resorting
to either using the platform C library (which includes macros to generate
the inline INT's) or using some compiler-specific inline assembly to
create the proper call sequence.

> Moreover, C solved the
> problem of interfacing to other languages by becoming so
> ubiquitous that all other languages have to make sure that
> they have an interface for talking to C.

In other words, C has not solved the problem. 

> It's a bit like comparing Windoze and Linux.

On some circles this would be analoguous to invoking Gowdin's Law.

Understand this: I am not against improving the FFI of the Haskell
systems or making their FFIs compatible.  My point is that making the
FFI part if the language is not necessarily necessary.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

Reply via email to