From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,235855e3822c83d1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.233.69 with SMTP id tu5mr3068150pbc.6.1334065810679; Tue, 10 Apr 2012 06:50:10 -0700 (PDT) Date: Tue, 10 Apr 2012 15:50:09 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Importing C function with variable argument list References: <610ee323-4c7f-413d-8568-aed4955f5152@z38g2000vbu.googlegroups.com> <27419261.1529.1334056979029.JavaMail.geo-discussion-forums@vbug19> <1e87cf28-678a-4931-a983-8dd98beac0f3@i18g2000vbx.googlegroups.com> In-Reply-To: <1e87cf28-678a-4931-a983-8dd98beac0f3@i18g2000vbx.googlegroups.com> Message-ID: <4f843a91$0$6572$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 10 Apr 2012 15:50:09 CEST NNTP-Posting-Host: 4113e284.newsspool3.arcor-online.net X-Trace: DXC=9TL>JNdj]bL=8m7nZkdN^@McF=Q^Z^V3H4Fo<]lROoRA8kFJLh>_cHTX3jMf__a3_6mgCK X-Complaints-To: usenet-abuse@arcor.de Path: r9ni40427pbh.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.ecp.fr!feed.ac-versailles.fr!news.chainon-marquant.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-04-10T15:50:09+02:00 List-Id: On 10.04.12 15:09, Maxim Reznik wrote: > Interfacing with C is often unsafe, due to properties of C. > Nevertheless Ada has interfacing features in standard. > > I'm just trying to say that these features are kind of incomplete. The "incompleteness" reflecting, in this case, a hack that happens to be inspired by a computer architecture, a von Neumann CPU with a stack together with the capabilities of a macro processor. Is it not possible to have a list-of-typed-arguments built into a language, and then have the compiler map this type to tricks from the Bronze Age of computing as needed? Eiffel has a TUPLE type that, I think, comes close. The mapping could be to C and to Forth alike :-)