comp.lang.ada
 help / color / mirror / Atom feed
From: hslama@datacomm.ch (Heribert Slama)
Subject: Re: I use Eiffel! and other "strange tongues"!
Date: 1997/08/09
Date: 1997-08-09T00:00:00+00:00	[thread overview]
Message-ID: <33eb6909.14319826@news.datacomm.ch> (raw)
In-Reply-To: dewar.870872376@merv


On 6 Aug 1997 09:03:07 -0400, in comp.software-eng,
dewar@merv.cs.nyu.edu (Robert Dewar) wrote:

><<>         What I'm saying is, you can write a Prolog interpreter, a
>> Smalltalk interpreter, a Fortan Compiler etc etc etc in C! But
>> you can't do the reverse. ....
>>......
>
>Complete nonsense of course, the reverse is perfectly easy to do, ...
>......
Harsh words, but you're right. Only, I would've  said "can be done"
instead of "is perfectly easy to do".
>I guess the writer is someone who only knows C, and cannot imagine
>that any other language could possibly be interesting (actually C
>is NOT a particularly good choice for writing a compiler, the last
>full compiler I wrote, not counting GNAT written in Ada 95, weas
>written entirely in COBOL, and I found it a much more pleasant
>language for compiler writing than C.

Oh, if you could've seen my eyes popping out! I even shouted
_nonsense_ (or was it #+%%&**# ?). Good, you couldn't hear that.
Instead let me ask you 2 questions:

1. what was the language to be compiled?
2. which version of COBOL did you use?

I had my latest contact with COBOL about 3 years ago. It was COBOL-II
on an IBM mainframe; this version still lacked the following features
available in C, PL/I, ALGOL, MODULA-2 (Pascal) and even BASIC:

- Internal subroutines with a parameter-passing mechansim, i.e.
subroutines defined in the same source module which could be CALLed in
the same way as external subroutines.
(Well, parameter passing (by value only) can be emulated by moving
data to and from work fields. I would hate to write so many lines of
code.)

- Pointers and storage management to build complex and highly variable
data structures.
(Well, a big table of characters/integers could emulate a heap and its
indexes be used as pointers. Instead of dynamic structures one could
often use sufficiently big static ones. I wouldn't take that path.)

- No stack ("automatic") variables, therefore no recursive calls, not
even indirect ones. Most programming languages contain nested
constructs (data definitions, expressions etc.). The use of recursive
procedures within the compiler is a quite natural approach. Are there
ways around it? Or, can you somehow emulate a recursive call in COBOL?
I'm not an expert in this field. But still, I would expect the
solution to be tedious for the programmer.

All in all, I would never choose COBOL (as_I_know_it)  to write a
compiler. Maybe your COBOL is much more adavanced than the
run-of-the-mill COBOL used on mainframes for commercial applications?
Then I would say: Yes, it's an option (and a matter of taste).

Bye
	-Heribert

---
Heribert Slama <hslama@datacomm.ch>
Systems programmer
Muttenz, Switzerland




  parent reply	other threads:[~1997-08-09  0:00 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-11  0:00 Eiffel anyone? - Who uses it? ivory
1997-07-11  0:00 ` Michael Schuerig
1997-07-11  0:00 ` Mike Stark
1997-07-11  0:00 ` Tom M. Chen
1997-07-11  0:00   ` robinsaj
1997-07-11  0:00 ` Richie Bielak
1997-07-14  0:00   ` Don Harrison
1997-07-11  0:00 ` Wes Groleau
1997-07-12  0:00 ` Ian Nelson
     [not found] ` <33CA5E3D.475B@edwardjones.com>
1997-07-14  0:00   ` Robert Dewar
     [not found]     ` <33CB8E75.7CB1@edwardjones.com>
1997-07-16  0:00       ` Robert Dewar
1997-07-16  0:00 ` Paul Johnson
1997-07-18  0:00   ` Robert Dewar
1997-07-25  0:00     ` Jan Bielawski
1997-07-17  0:00 ` Matthew Heaney
1997-07-17  0:00   ` Walt Howard
1997-07-18  0:00     ` Technical Professionals and the humnaities ( Was: Re: Eiffel anyone? - Who uses it?) Chris Kuan
1997-07-18  0:00       ` Paul Johnson
1997-07-20  0:00         ` Thaddeus L. Olczyk
1997-07-22  0:00           ` Joseph M. Saur
     [not found]     ` <33CF6C0E.4983@edwardjones.com>
1997-07-18  0:00       ` Eiffel anyone? - Who uses it? Walt Howard
1997-07-18  0:00     ` Henrik Wist
1997-07-21  0:00   ` Don Harrison
     [not found]   ` <01bc94e6$9ced0820$287b7b7a@tlo2>
1997-07-19  0:00     ` Frieder Monninger
1997-07-22  0:00     ` Joachim Durchholz
1997-07-30  0:00     ` Glenn Williamson
1997-07-30  0:00       ` Brian Rogoff
1997-07-30  0:00         ` Jon S Anthony
1997-08-01  0:00           ` I use Eiffel! and other "strange tongues"! Jakob Engblom
1997-08-02  0:00             ` Walt Howard
1997-08-02  0:00               ` Ian Nelson
1997-08-02  0:00                 ` Robert Dewar
1997-08-03  0:00                 ` Matt Kennel (Remove 'NOSPAM' to reply)
1997-08-03  0:00                   ` Robert Dewar
1997-08-07  0:00                 ` Andrew Semprebon
1997-08-08  0:00                   ` W. Wesley Groleau x4923
1997-08-08  0:00                     ` Walt Howard
1997-08-11  0:00                       ` Jeff Brown
1997-08-13  0:00                       ` quadrafeline
1997-08-09  0:00                 ` Adam Beneschan
1997-08-04  0:00               ` W. Wesley Groleau x4923
     [not found]                 ` <dewar.870872376@merv>
1997-08-09  0:00                   ` Heribert Slama [this message]
     [not found]               ` <5s8bsh$mo0@alumni.rpi.edu>
1997-08-06  0:00                 ` C/C++ is the best teaching language??!? HARRY R. ERWIN
1997-08-08  0:00                 ` Tom Valesky
1997-08-02  0:00           ` Eiffel anyone? - Who uses it? Nick Payne
1997-08-02  0:00             ` Walt Howard
1997-08-02  0:00           ` Sean Case
1997-07-30  0:00       ` Brian Kimball
1997-07-31  0:00         ` Why I didn't like Eiffel Glenn Williamson
1997-08-02  0:00           ` Ian Nelson
1997-07-31  0:00       ` Eiffel anyone? - Who uses it? Don Harrison
replies disabled

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