[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Language Implementation Languages

> Date: Fri, 16 May 2003 16:19:49 -0400
> From: "Peter J. Wasilko, Esq." <futurist@cloud9.net>
> Greetings All,
>     Is anyone using anything other than C and its heirs for their low level language implemenation work?
>     It seems all to easy to introduce bugs in one's implmentation when using something as unsafe as C.
>     Are there better choices?
> Warmest Regards,
> Peter

Ocaml is an excellent choice for writing other languages.  It's used in
many compiler courses.  Union types, in particular, are extremely
convenient for describing parse trees.  Ocaml is also a high-level
language, with garbage collection, a powerful type system, etc. etc.

That said, there are good reasons why C is so dominant as a language
development language:

1) It's universally available, making it the lowest common denominator.

2) It's likely to be as efficient or more efficient than any other
   language you would use for this task.

3) It interfaces well to assembly code for those areas where this is needed
   (for instance, garbage collectors often need some assembly code).

4) It simplifies the process of providing a C foreign function interface to
   a language, which in turn makes it feasible to interface a huge number
   of libraries to your new language.

5) It gets the job done ;-)