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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fc52c633190162e0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps82.POSTED!023a3d7c!not-for-mail Sender: blaak@METROID Newsgroups: comp.lang.ada Subject: Re: why learn C? References: <1172144043.746296.44680@m58g2000cwm.googlegroups.com> <1172161751.573558.24140@h3g2000cwc.googlegroups.com> <546qkhF1tr7dtU1@mid.individual.net> <5ZULh.48$YL5.40@newssvr29.news.prodigy.net> <1175215906.645110.217810@e65g2000hsc.googlegroups.com> <1175230700.925143.28490@n59g2000hsh.googlegroups.com> <1btkgzzj6zimp.acsq8mkzqz1w$.dlg@40tude.net> <1175488143.324741.283480@y80g2000hsf.googlegroups.com> <9l1Rh.7648$%G4.3596@trndny05> From: Ray Blaak Message-ID: Organization: The Transcend User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 06 Apr 2007 05:57:27 GMT NNTP-Posting-Host: 208.66.252.228 X-Trace: edtnps82 1175839047 208.66.252.228 (Thu, 05 Apr 2007 23:57:27 MDT) NNTP-Posting-Date: Thu, 05 Apr 2007 23:57:27 MDT Xref: g2news1.google.com comp.lang.ada:14805 Date: 2007-04-06T05:57:27+00:00 List-Id: Hyman Rosen writes: > jayessay wrote: > > Please. You are embarassing yourself with this. > > I notice you have no comment on the lack of mind-numbingness > in my C++ template primality tester. Given that you're wrong > about C++, I have no trouble believing that you're wrong about > Lisp as well. This is getting stupid. Jon probably knows both C++ templates and definitely knows Lisp quite well. The fact that you can code up a Car/Cdr abstraction in some programming notation does note make it lisp like. You can code these list abstractions in any language you choose, and that does not make a lisp. What makes something a Lisp is a whole philosophy of symbolic, dynamic and introspective (and protected!) programming that C++ simply is not natively capable of. Also, Lisp's list syntax notation is also critical (Dylan be damned!), as that syntax is what allows the whole "programs as data" paradigm to practically work. Your basic point that C++ templates need not be considered as a fundamental evil is properly taken. In fact C++ in general tends to get a bad rap in c.l.a. The simple fact of the matter is that a professional programmer worth their salt should know how to use C++ properly so as to readily and easily avoid its stupidities and program safely. However, even with your demonstration of some cool templates, it is still the case that "programming" like this with templates is fundamentally strange. One has to think very differently compared to the usual programming languages. More importantly, the need to program like this in templates I have strong doubts about. If you really want to test a prime, for example, why on earth would you not do so at run time, when you actually need the value? Even if it's for a constant, you can compute it lazily, or during initialization, making it externally read only, etc. That is a much much clearer and understandable way to present things. The proper way to program at compile time should be with traditional program statements that happen to run in the "build" phase. This is much more direct and clearer to understand. I note that you can actually do that with Lisp/Scheme. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.