comp.lang.ada
 help / color / mirror / Atom feed
* Looking for languages that compile to C
@ 1993-02-15 13:47 agate!spool.mu.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwi
  0 siblings, 0 replies; 2+ messages in thread
From: agate!spool.mu.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwi @ 1993-02-15 13:47 UTC (permalink / raw)


Netters,

I'm assisting a Government Department to set up a programming
development environment and as part of that process I'm helping them
choose programming languages.

For a couple of years I've been wavering between Ada and C/C++. In my
view, for most programming, Ada is obviously better (don't flame me -
I already KNOW that many people disagree with this), but the world has
grasped C so firmly and there are so many compilers for it, and so
many libraries for it, and so much support for it, that it seems to
have become compulsary :-) Certainly, the Government Department seems
pretty enthusiastic about it, and would probably consider it a
"courageous decision" not to use it.

Anyway, it occurred to me that, given that everyone has to live with
C, it might be that the best compromise is to find some nice clean
language whose compiler is written in a portable subset of C and which
compiles down to a portable subset of C. This would have the following
advantages:

   * Most of the time we wouldn't have to program in C. We could use a
   civilized typesafe language with lots of nice object orientedness and
   so on.

   * But if we needed to use a C library, Unix interface, or do some
   grotty hacks, we could temporarily break through and use C.

   * Code written in the higher language would be MORE portable than C code
   because it is GUARANTEED to compile to a portable subset of C (whereas
   a C programmer might inadvertently do something non-portable). So
   you get the best of the high-level portability of Ada
   (well-definedness), and the pragmatic practical portability of C
   (a compiler on almost every existing Von Neumann architecture machine :-).

A quick look around reveals the language Eiffel (which compiles to C)
and which seems to be even better than Ada (perhaps far better). I
have read Betrand Meyer's book "Object-oriented Software Construction"
and was very impressed. However, I just peeked in comp.lang.eiffel and
found:

   #From: anicolao@watcgl.uwaterloo.ca (Alex Nicolaou)
   #Newsgroups: comp.lang.eiffel
   #Subject: Re: Needed: Info about Eiffel compilers.
   #Message-ID: <C2BzFz.2Lv@watcgl.uwaterloo.ca>
   #Date: 12 Feb 93 10:21:34 GMT
   #References: <t163xwb@rpi.edu>
   #Organization: Computer Graphics Laboratory, University of Waterloo, Ontario
, Canada
   #Lines: 23
   #
   #beascoea@colossus.cs.rpi.edu (Alex Beascoechea) writes:
   #
   #>Is it ever going to be a mainstream language? Or is it just designed to be
 the
   #> best kept  secret in computer languages(Only for initiates)?
   #
   # ** Judging by the lack of activity in this group, the lack of response to
   #my request for code, and the fact that nobody@eiffel.com will send me mail,
   #it seems hard to predict a bright future for eiffel. "Eiffel, The Language"
   #comes in two inconsistent printings, adds apparently unecessary extensions
   #to what was a small, clean, language, and "Eiffel, The Libraries" seems to
   #be hard to find.
   #
   # Best summed up by a professor in this university's programming language
   #research group: "There was a lot of interest in Eiffel at first but as
   #people investigated the interest died down - Eiffel is a dead language."
   #
   #Ironically, I'm part of a project to produce a compiler which is well
   #on its way to completion, but for which I'm unable to aquire any
   #sample code with which to verify the compiler's correctness...long live
   #C++, with all its warts.
   #
   #
   #alex

Well said - but I've always found it useful to distinguish between
warts and cancer. :-)

Anyway, I think it would be great if there was a civilized language
out there for which compilers exist that compile down to C. Does
anyone know of any others besides Eiffel? I'm looking more for
civilized 3GLs than constraining 4GLs designed for screen design and
query lookup.

Feel free to post replies, but please be sure to email them to me too
as I may not get to see all the postings in the groups I post to - we
have a fairly short news lifetime here. Also, unless you specify
otherwise, emailing me will constitute permission to reproduce your
email publicly in postings, compendiums, FTP archives and so on that I
may wish to create on this topic. Email me if you want a summary of
replies.

Thanks very much,

Ross Williams
ross@spam.adelaide.edu.au

PS: I'm sure many C hackers will object to my use of the word
"civilized". However, think about this. I have a friend (a competent
but not too experienced programmer) who programs in a primitive BASIC
using GOSUBS and GOTOS and so on. He understands the power C could
give him and wants the power, but he treasures too much the way the
BASIC interpreter clearly identifies his programming errors (as
opposed to blowing the machine apart). As for me, I have learnt to
live with C through subversive techniques such as using my own heap
manager that places check bytes at the ends of allocated blocks, and
by including magic numbers and checksums in instances of supposedly
closed abstractions.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Looking for languages that compile to C
@ 1993-02-17  2:04 swrinde!elroy.jpl.nasa.gov!sdd.hp.com!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!sol.ctr.columbia.edu!eff!world!srctran
  0 siblings, 0 replies; 2+ messages in thread
From: swrinde!elroy.jpl.nasa.gov!sdd.hp.com!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!sol.ctr.columbia.edu!eff!world!srctran @ 1993-02-17  2:04 UTC (permalink / raw)


    Check comp.archives on the USENET.  There are a constant stream of
new procedural languages, functional programming languages, and new AI
languages, most of which kick out C code.
    Also, from time to time compiler construction kits like the ELI
system from one of the US universities is also posted, if you want to
develop your own "safe" language.

Greg Aharonian
-- 
**************************************************************************
Greg Aharonian
Source Translation & Optimiztion
P.O. Box 404, Belmont, MA 02178

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-02-17  2:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-02-15 13:47 Looking for languages that compile to C agate!spool.mu.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwi
  -- strict thread matches above, loose matches on Subject: below --
1993-02-17  2:04 swrinde!elroy.jpl.nasa.gov!sdd.hp.com!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!sol.ctr.columbia.edu!eff!world!srctran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox