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.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HEADER_SPAM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,745ecf6266b2fdbf X-Google-Attributes: gid1014db,public X-Google-Thread: 100850,745ecf6266b2fdbf X-Google-Attributes: gid100850,public X-Google-Thread: 109fba,745ecf6266b2fdbf X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,745ecf6266b2fdbf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-10 22:15:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!news-out.visi.com!hermes.visi.com!gemini.plethora.net.POSTED!not-for-mail X-Old-trace: posting.google.com 1044863100 843 127.0.0.1 (10 Feb 2003 07:45:00 GMT) Subject: Re: [ANN] an EBNF parser and coding pattern tool (LGPL) Content-Transfer-encoding: 8bit References: From: codeworker@free.fr (Cedric LEMAIRE) Organization: http://groups.google.com/ Return-Path: Content-Type: text/plain; charset=ISO-8859-1 X-Old-complaints-to: groups-abuse@google.com Newsgroups: comp.lang.c.moderated,comp.lang.ada,comp.lang.c,comp.lang.c++ Message-ID: Originator: clcm@plethora.net (Comp Lang C'Moderated) Date: 11 Feb 2003 06:15:44 GMT NNTP-Posting-Host: 0c7f277b.news.plethora.net X-Trace: 1044944144 gemini.plethora.net 79558 clcm@205.166.146.1 X-Complaints-To: abuse@plethora.net Xref: archiver1.google.com comp.lang.c.moderated:7411 comp.lang.ada:33976 comp.lang.c:172479 comp.lang.c++:202459 Date: 2003-02-11T06:15:44+00:00 List-Id: Anthony Williams wrote in message news:... > codeworker@free.fr (Cedric LEMAIRE) writes: > > > And C++ templates are too restricted to do generic programming and > > code generation in a large scope. I'll give examples later if some > > people react to this assertion. > > OK, I'll bite ... why do you think C++ templates are too restricted? The C++ compiler doesn't give you introspection to implement C++ templates that work on the composition of a class. How to write with C++ templates an "Object Unmarshaller", for instance? I mean, something that reads the serialized content of an object and that builds the corresponding object in memory. Be careful! No intervention must be done on these objects in C++ to facilitate their integration into the "unmarshaller". How to write an "Object Walker", something that enables to navigate amongst the object attributes of the instances, for applying a task on them (starting from a given object: to initialize all of them or to serialize all of them or describing them in HTML to query the application from a browser ...)? I want to be able to write the generic code of these features as easily as if I was implementing them by hand, for each object to handle. But the 'coding pattern' must be written once only and must be easy to support. And not to be an intellectual exercise for the pleasure of the brain. And it is why I said that C++ templates are too restricted (I could have said: "... and not very readable on complex features" but I haven't because it is a question of taste I imagine). -- Cedric -- comp.lang.c.moderated - moderation address: clcm@plethora.net