Xref: utzoo comp.lang.c:9284 comp.sys.ibm.pc:14428 Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: cdecl keyword Message-ID: <7682@brl-smoke.ARPA> Date: 14 Apr 88 00:00:24 GMT References: <1238@wjvax.UUCP> <297@ho7cad.ATT.COM> <1242@wjvax.UUCP> <7595@brl-smoke.ARPA> <4259@cup.portal.com> <7606@brl-smoke.ARPA> <982@micomvax.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 35 In article <982@micomvax.UUCP> ray@micomvax.UUCP (Ray Dunn) writes: >What do you suggest as an alternative? To put the onus on the *other* >languages? Sure, that is possible, but who says 'C' has to be the reference >language? Your entire response shows that you missed what I was saying. Point 1: There need not be a "reference language". However, access to system-provided objects and functions (e.g. ROM facilities) may well be designed with a particular language's interface techniques in mind. That by no means necessitates the concept of a single system-wide "reference language", however. Point 2: Each language implementation can provide its own extensions for interfacing to foreign objects and functions. Thus "__pascal" would be a reasonable type qualifier to add to the C language in such an environment. Point 3: There is not a one-to-one mapping between C and other languages even at the external interface level, so it is inappropriate to apply a blanket mapping to an entire C source file. A local mapping should be used, for example in the external declarations for foreign externs in a header. I think the blanket mapping facility was most likely provided so that programmers didn't have to be aware of what they were doing, which in my experience is not an approach to be recommended. The other likely reason would be to speed up the interface, but all that shows is that a poor choice was made for the C interface design. It need not be slower than a Pascal interface. People who wish to continue the discussion on this point are advised to read Bell Labs CSTR #102 before wasting any more time. Point 4: My home computer uses a scheme exactly as I have described; it even has a segmented architecture. Don't accuse me of lack of experience!