Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!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 15:33:38 -0800 Organization: A noiseless patient Spider Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 23 Jan 2014 23:33:41 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="9358cda03e1e0dfd3c4b757daa608707"; logging-data="11962"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xzMsYKpj4RenKvtGqQ4G16cneLgnmXzc=" 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:ue4YfpFLbpjKzKdc693e2OglnnM= Xref: csiph.com comp.lang.java.programmer:27395 On 1/23/2014 2:29 PM, Jeff Higgins wrote: > > Why would one want type information visible in your "path expression". > Removing the operator overloading would convey type information. - binds package to class. ^ binds class to subclass : binds class to field package a.b.c; class G { int h = 8; } class F { G g = new G(); } class d { static class e { static F f = new F(); }} becomes a.b.c-d:e^f:g:h But no one thinks that way, or wants to. The type information is there, but the example really isn't better for it. Better to use names that convey information than to make funny symbols that look like your cat walked on the keyboard. R.layout.main is an unfortunate example of not using names to properly convey information. It's a quirk of working with actual human beings that we all have to put up with this sort of thing on occasion.