Message from discussion
Sum types (Was: Re: OT: More Antilock brakes)
Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!pool-141-150-37-44.mad.east.verizon.NET!not-for-mail
From: "Daniel C. Wang" <danwan...@hotmail.com>
Newsgroups: comp.lang.lisp,comp.lang.functional
Subject: Re: Sum types (Was: Re: OT: More Antilock brakes)
Date: 05 Dec 2003 00:31:20 -0500
Lines: 16
Sender: danwang@danwang-laptop
Message-ID: <82ptf3n847.fsf@danwang-laptop.i-did-not-set--mail-host-address--so-shoot-me>
References: <gat-1811030844550001@192.168.1.51> <fb74251e.0311260708.41428f5e@posting.google.com> <bq2ohc$bhp$1@grizzly.ps.uni-sb.de> <fb74251e.0311270853.31068e01@posting.google.com> <3fca7af4$1@news.unimelb.edu.au> <fb74251e.0311302156.2a9eaa1a@posting.google.com> <bqf708$rdv$1@grizzly.ps.uni-sb.de> <fb74251e.0312011346.1876ae29@posting.google.com> <bqhuvd$of0$1@grizzly.ps.uni-sb.de> <fb74251e.0312031034.5100b388@posting.google.com> <bqn6c8$m4r$1@grizzly.ps.uni-sb.de> <fb74251e.0312041349.3d312ef1@posting.google.com> <uwu9cw803.fsf@fake.address.us>
NNTP-Posting-Host: pool-141-150-37-44.mad.east.verizon.net (141.150.37.44)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.uni-berlin.de 1070602312 72368371 141.150.37.44 ([216221])
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
Christopher Jeris <cje...@fake.address.us> writes:
> cesuraS...@verizon.net (William D Clinger) writes:
> > This is untrue. As noted in a previous post, I would not use instanceof
> > for pattern matching in Java. If you do not understand how to avoid the
> > use of instanceof, then let's start a new thread on that topic.
>
> Okay, I'm a novice everything, but curious: Manually put a type-tag
> field in the direct superclass of your summands, and dispatch on that?
> (If that's a blazingly stupid way to do it, please don't understand me
> to impute such stupidity to you!)
http://nice.sourceforge.net/visitor.html