Xref: utzoo comp.lang.fortran:1479 comp.lang.c:13927 Path: utzoo!utgpu!watmath!clyde!mcdchg!chinet!att!pacbell!ames!oliveb!sun!dgh!dgh From: dgh%dgh@Sun.COM (David Hough) Newsgroups: comp.lang.fortran,comp.lang.c Subject: isomorphic languages Message-ID: <75326@sun.uucp> Date: 30 Oct 88 04:31:27 GMT Sender: news@sun.uucp Lines: 52 Thesis: Language designers (including X3Jn committees) needn't incorporate every bad syntax of the past if revised versions are syntactically isomorphic. One thing I've noticed in the current Fortran-8x discussion and in some previous X3J11 C discussions is that new users of the new languages are predestined to a lot of agony on the cross of literal compatibility. These new users are destined to repeat all the mistakes necessary to learn the tricks of the masters. Of course, the masters don't regard these mistakes as flaws in the languages, but as features, which furthermore help maintain full employment for the masters. I'd consider Fortran-8x to be upwardly compatible with Fortran-77, and X3J11 C to be upwardly compatible from K&R, if every legal old program could be converted to a legal new program by a "context-free" translator that only has to look at one logical input line at a time. One logical input line may contain multiple physical input lines - Fortran-77 continuation lines are what I have in mind. Languages with this "context-free translatability" property could be called "syntactically isomorphic". In the last public review I urged X3J3 to be bold about devising modern syntax for Fortran-8x. I don't think it's necessary for Fortran-8x compilers to accept Fortran-77 >syntax< if it is possible to provide a translator as described above. "Possible" means possible according to the syntactical differences rather than according to the possible skills of translator implementors; the requirement that a context-free translation be possible is intended to minimize the skill requirement. Furthermore, thanks to people like Richard Stallman, such translators would be readily available in the public domain. Note that unfortunately Fortran-8x will have to accept Fortran-77 >semantics<, which is most of the hard part, however expressed, so the complexity of the total compiler wouldn't be much lessened; the thrust of this proposal is to eliminate the known syntactic stumbling blocks. Thus there's no reason to continue to inflict bugs like do i = 1. 10 or its C counterpart if(x=y) ... It's too late for X3J11 this time around, but I can at least hope for a better result from X3J3. David Hough dhough@sun.com na.hough@na-net.stanford.edu {ucbvax,decvax,decwrl,seismo}!sun!dhough