From ... From: Erik Naggum Subject: Re: Why no standard foreign language interface? Date: 2000/02/15 Message-ID: <3159635132109700@naggum.no>#1/1 X-Deja-AN: 586276796 References: <38A1C047.148D6466@raytheon.com> <3159120499145849@naggum.no> <38A1F68E.F218AB44@raytheon.com> <3159133748798780@naggum.no> <38A2A10B.50E08863@iname.com> <3159296652595081@naggum.no> <38A57F2A.F204753D@iname.com> <3159472938302521@naggum.no> <38A7EEC6.4207797D@pindar.com> <3159561340687049@naggum.no> <38a99788$0$233@newsreader.alink.net> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 950647656 23072 195.0.192.66 (15 Feb 2000 20:47:36 GMT) Organization: Naggum Software; +47 8800 8879 or +1 510 435 8604; fax: +47 2210 9077; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 15 Feb 2000 20:47:36 GMT Newsgroups: comp.lang.lisp * "Harley Davis" | Erik, could you say a few more words about when you've seen C++ programmer | inappropriately pass pointers to structs and classes? I can't recall having | seen much of this to disapprove of, so I'm curious what your experience has | been. it is not "inappropriate" for C++ programmers to pass pointers around -- they have no other mechanisms to use for non-trivial argument passing of any kind. what I consider inappropriate is trying to map such C++-style pointer-passing directly into Common Lisp at the FFI level when we have powerful lamba lists and multiple values, and therefore I favor writing wrapper code in C/C++ that makes use of far simpler argument-passing techniques that can be called with far more ease from Common Lisp. and since this is drudgery at best, it should be handled by automated tools. (and before we have another stupid confusion, I'm _not_ saying (and never have said) that writing such tools is trivial -- I'm saying that the output of such automated tools will of necessity be trivial to make fit _any_ form of FFI glue code that people invent in solitude, and that we should re-focus on the tools, not on standardizing FFIs, which will be a lot of meaningless work to tie vendors and developers into using an FFI with a standard form that won't be able to handle all that interfacing to C++ requires, anyway, simply because of the magnitude of the braindamage in that language and what people do to survive it.) #:Erik