Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: markspace Newsgroups: comp.lang.java.programmer Subject: Re: building "path expressions" Date: Thu, 23 Jan 2014 09:33:49 -0800 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 23 Jan 2014 17:33:52 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="9358cda03e1e0dfd3c4b757daa608707"; logging-data="8509"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zdlQvO2MB3PajC4s6d7lr+iaZVac+JWY=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: Cancel-Lock: sha1:Jtq3UZj0iFSrKHTa8qzbGoKdXG4= Xref: csiph.com comp.lang.java.programmer:27387 On 1/23/2014 8:37 AM, Stefan Ram wrote: > I think it is funny that one can use either package names /or/ nested > classes /or/ fields to implement such a path, without this choice being > visible in the »path expression«. For example, one posssibility to > { java.lang.System.out.println( a.b.c.d.e.f.g.h ); }} Well I'm not sure what you find "funny" here; possibly that . is used to both separate a name in package name, and to access a field? It's not the first example of operator overloading in a language. In Java, the + operator means integer addition, floating point addition (two very different things) as well as string concatenation. But I don't find it funny, merely practical and sensible. Natural languages use the same word to mean different things as well, why should mathematical languages be any different?