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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107f24,626a0a064b320310 X-Google-Attributes: gid107f24,public X-Google-Thread: f4fd2,626a0a064b320310 X-Google-Attributes: gidf4fd2,public X-Google-Thread: 103d24,626a0a064b320310 X-Google-Attributes: gid103d24,public X-Google-Thread: 103376,ea8ea502d35ca2ce X-Google-Attributes: gid103376,public X-Google-Thread: 1164ba,626a0a064b320310 X-Google-Attributes: gid1164ba,public X-Google-Thread: 10259a,626a0a064b320310 X-Google-Attributes: gid10259a,public X-Google-Thread: 114809,626a0a064b320310 X-Google-Attributes: gid114809,public X-Google-ArrivalTime: 2001-05-16 09:20:06 PST From: "J�rgen Exner" Newsgroups: comp.lang.ada,comp.lang.lisp,comp.lang.smalltalk,comp.lang.basic,comp.lang.functional,comp.lang.scheme,comp.lang.perl References: <9cukad$nn68@news-dxb> <9d6b6e$1bt$1@nh.pace.co.uk> <87snihxiwc.fsf@frown.here> <9dbi83$sji$1@nh.pace.co.uk> <87heyu7cqd.fsf@frown.here> <9dc20p$hh15e$1@ID-37382.news.dfncis.de> <3B003CA2.D24D083C@research.bell-labs.com> Subject: Re: Beginner's Language? Date: Wed, 16 May 2001 09:16:17 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: jue1.redmond.corp.microsoft.com X-Original-NNTP-Posting-Host: jue1.redmond.corp.microsoft.com Message-ID: <3b02a7d0$1@news.microsoft.com> X-Trace: 16 May 2001 09:16:16 -0700, jue1.redmond.corp.microsoft.com Path: archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!sea-feed.news.verio.net!news.verio.net!news.microsoft.com Xref: archiver1.sj.google.com comp.lang.ada:7567 comp.lang.lisp:10155 comp.lang.smalltalk:9721 comp.lang.functional:5668 comp.lang.scheme:3842 comp.lang.perl:2774 Date: 2001-05-16T09:16:17-07:00 List-Id: "Matthias Blume" wrote in message news:3B003CA2.D24D083C@research.bell-labs.com... > false and (in some sense) true > (Functions _are_ first-class objects in C; and you cannot do _elegant_ functional > programming in C.) Sorry, that's not correct. In C the only first-class objects are byte, chars, ints, doubles, ..., and pointers. These are the only objects you can use - as elements of a complex data structure (array, record or however you want to call it) - return value of a function/procedure Second class objects in C are e.g. strings, arrays, and functions/procedures because they cannot be be used as elements in a complex data structure or as a return value of a function. Of course, because C is so low-level, you can simulate functional programming by using pointers to functions and for complex datastructes. But with the same argument could be applied to even assembler. jue