home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.cobol
- Path: sparky!uunet!pipex!mfmail!jfid
- From: jfid@mfltd.co.uk (James Fidell (x5320))
- Subject: Re: cobol
- Message-ID: <1993Jan25.120413.24471@mfltd.co.uk>
- Sender: jfid@mfltd.co.uk (James Fidell (x5320))
- Organization: Micro Focus Ltd., Newbury, UK
- References: <1993Jan13.4605.763@dosgate> <1jm43fINN8rv@mirror.digex.com> <1993Jan21.133510.4271@mfltd.co.uk> <9302421.22722@mulga.cs.mu.OZ.AU>
- Date: Mon, 25 Jan 1993 12:04:13 GMT
- Lines: 57
-
-
- In article <9302421.22722@mulga.cs.mu.OZ.AU>, fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
- > jfid@mfltd.co.uk (James Fidell (x5320)) writes:
- >
- > >In fact, the Micro Focus COBOL compiler (and many of the other tools) *are*
- > >written in COBOL. (Yes, I was gob-smacked when I found out as well :-). I
- > >do believe you'd have to be a masochist to want to do it, but then again,
- > >the compiler ports to just about any system first time, which is more than
- > >can be said for the C runtime.
- >
- > The difference is due to the nature of the tasks, not the languages used
- > to implement them. It would be easy enough to write a completely portable
- > compiler in C.
-
- I agree, in principle. The ease and speed with which characters and small
- numbers can be manipulated in C are far greater than that of COBOL, thus
- lexical and syntactic analysis will be faster. Pointers are another area
- where C benefits greatly -- I really wouldn't want to try to implement a
- parse tree in COBOL.
-
- However, my experience on 40+ different machines running different flavours
- of UNIX and different C compilers makes me skeptical about how easy it is
- to write truly portable C. Of course, ANSI, POSIX et al will probably go
- a long way towards sorting this out.
-
- In comparison, the COBOL compiler, which is delivered to my own group in
- interpreted code (we don't even get to see the source unless we ask for it)
- runs first time on just about any platform.
-
- > Is the Micro Focus COBOL compiler actually written and compiled in Micro
- > Focus COBOL?
-
- Yes it is. However, the interpreted code is not what is delivered as the
- final product -- we use a code generator (which is also written in COBOL,
- and part of the final product) to turn the interpreted code into something
- which is very similar to a linkable object file (in fact, the generator can
- produce these too). These then make calls to the runtime interpreter to
- provide support for things which are not easy or worthwhile doing in the
- actual object (screen and file io, for instance).
-
- > That would make it fairly inefficient. (I'm presuming from
- > what you said above that Micro Focus uses a runtime interpreter.)
-
- I have no idea of how this compares to C in terms of efficiency, but I
- believe that the greatest loss is in providing a mechanism for C and COBOL
- to be able to understand each other's datatypes.
-
- > --
- > Fergus Henderson fjh@munta.cs.mu.OZ.AU
- > This .signature virus is a self-referential statement that is true - but
- > you will only be able to consistently believe it if you copy it to your own
- > .signature file!
- --
- "Yield to temptation -- |
- it may not pass your way again" | jfid@mfltd.co.uk
- |
- - Lazarus Long | James Fidell
-