Return-Path: Delivered-To: apmail-jakarta-avalon-dev-archive@apache.org Received: (qmail 79148 invoked from network); 16 Jun 2002 10:51:10 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 16 Jun 2002 10:51:10 -0000 Received: (qmail 5322 invoked by uid 97); 16 Jun 2002 10:51:12 -0000 Delivered-To: qmlist-jakarta-archive-avalon-dev@jakarta.apache.org Received: (qmail 5306 invoked by uid 97); 16 Jun 2002 10:51:12 -0000 Mailing-List: contact avalon-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon Developers List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-dev@jakarta.apache.org Received: (qmail 5294 invoked by uid 98); 16 Jun 2002 10:51:12 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Subject: Re: [proposal] avalon 5 ComponentManager interface From: Leo Simons To: Avalon Developers List In-Reply-To: <3D0A0C27.47CB22C0@apache.org> References: <002101c21146$cbb07fc0$ac00a8c0@Gabriel> <200206121033.22873.peter@apache.org> <3D0A0C27.47CB22C0@apache.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.5 Date: 16 Jun 2002 12:51:01 +0200 Message-Id: <1024224661.2386.7.camel@lsd.bdv51> Mime-Version: 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Fri, 2002-06-14 at 17:30, Stefano Mazzocchi wrote: > Peter Royal wrote: > > > nor have I seen an example that *requires* a hint, they can all be refactored > > into a single lookup key. > > Of course, this is trivial topology: any two dimensional infinite > discrete sets can be mapped onto a one dimensional infinite discrete > set. > > The problem is not feasibility, is semantics. yup. > when you do something like > > lookup(x,y); > > you are explicitly keeping the two dimensions separate, when you do > > lookup(x+y); > > you are actually doing two conceptual things at once > > 1) (x,y) -> x+y [2-d mapping into 1-d mapping] > 2) x+y -> component [1-d mapping into 1-d mapping] > > This looks like a hack imposed by a framework constraint that shouldn't > be there. and that last sentence isn't really true. Because doing those two things at once eases the use of the lookup() method if there is no need for an "y", and in a completely well-designed system there should very rarely be a need for "y", this decision was made. It is not a hack. IOW: making the 2-d to 1-d mapping part of the caller instead of the callee simplifies the use of the callee where there is only 1-d. on a more pragmatic front, it is a pattern used in all other lookup mechanisms. - Leo Simons -- To unsubscribe, e-mail: For additional commands, e-mail: