Newsgroups: comp.lang.c++ Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Eiffel vs. C++ Message-ID: <1989Jun7.223554.309@utzoo.uucp> Organization: U of Toronto Zoology References: <2689@ssc-vax.UUCP> <6590138@hplsla.HP.COM> <149@eiffel.UUCP> <233@pink.ACA.MCC.COM> <1989Jun6.171549.16028@utzoo.uucp> <4684@psuvax1.cs.psu.edu> Date: Wed, 7 Jun 89 22:35:54 GMT In article <4684@psuvax1.cs.psu.edu> schwartz@shire.cs.psu.edu (Scott Schwartz) writes: >>(Me? I find the Pascal theory very attractive but at the moment am fully >>in the C camp for pragmatic reasons. Combining the virtues of the two >>ought not to be impossible but seems to be difficult in practice. Perhaps >>a mixed approach is better than trying to pick one or the other.) > >Isn't this what Turing Plus tries to do? There are several languages that try to provide a "safe" subset and a more powerful version that can be used only in "unsafe" modules. (It's been a long time since I read about Turing Plus, but that's my vague memory of it; certainly this is Modula 3's approach.) There are two problems with this. First, restrictions on how unsafe code can be used are common (e.g. one must call a function to get at it). Second, the unsafe language is seldom anywhere near as powerful as, say, C -- it's usually the safe language with a few minimal, grudgingly-provided extensions. Things like pointer arithmetic, for example, are seldom directly available. The usual result is that it's easier to just write the unsafe parts in C and call them. You're going to have the function-call overhead anyway. That is what I meant by a mixed approach (as opposed to a combination): admit that you want two different languages, not a Dr.Jekyll/Mr.Hyde combination, and concentrate on clean interfaces and fast interlanguage calls. -- You *can* understand sendmail, | Henry Spencer at U of Toronto Zoology but it's not worth it. -Collyer| uunet!attcan!utzoo!henry henry@zoo.toronto.edu