From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [9fans] OT: small xml parser found! Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) From: Rob Pike To: 9fans@cse.psu.edu Content-Transfer-Encoding: 7bit In-Reply-To: <4034D6EA.9090703@insultant.net> Message-Id: Date: Thu, 19 Feb 2004 08:16:19 -0800 Topicbox-Message-UUID: ee38c78c-eacc-11e9-9e20-41e7f4b1d025 >> callbacks are horrible. > > callbacks are fine. ok, now i can say why they're not fine. they're pretty close to event handlers, and i've written what's wrong with that model in several papers. callbacks for i/o are particularly egregious. i've seen callbacks for certain parsing applications that worked fairly cleanly. the difference is that in one case we're avoiding threads and being asynchronous, while in the other we're just turning case statements into function calls. -rob