From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!small.news.tele.dk!129.240.148.23!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Small read macro issue Date: 08 Oct 2002 01:10:58 +0000 Organization: Naggum Software, Oslo, Norway Lines: 31 Message-ID: <3243028258838806@naggum.no> References: <3242994656390587@naggum.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: maud.ifi.uio.no 1034039459 1482 129.240.65.5 (8 Oct 2002 01:10:59 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 8 Oct 2002 01:10:59 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:43410 * Adam Warner | Are there advantages to choosing a wrapper class instead of a struct? | It seems that a struct may be more suitable because it has a readable | representation by default. That is what they specialized method on print-object was for. I prefer structs only when there is no possible need to change the layout of the class. Redefining a structure generally does not work, and code that uses structures is generally inlined. You are much better off using classes until you know very precisely what you are doing. One reason to use a wrapper class that adds a new type to the string in question is that keyword arguments in Common Lisp follow a fixed number of arguments. You have to write your own parser functions to find the options if they are flagged with keywords. This is silly and is more of an abuse of the feature than reasonable use of it. If you have to do some kind of dispatch, avoiding a property list that has a tail of non- properties is a really good thing. Your need is to recognize options when something like this is passed around, and that is fully satisfied with a new "type" around the string. There are many problems when processing TeX code. I really suggest you do something that is easier to accomplish than to force a bright idea that does not work to work. -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.