Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31631

Re: What is your favorite WC++IETJ?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: What is your favorite WC++IETJ?
Date Thu, 30 Apr 2015 10:03:36 -0400
Organization A noiseless patient Spider
Lines 38
Message-ID <mhtclu$nh5$1@dont-email.me> (permalink)
References <WCIETJ-20150430130949@ram.dialup.fu-berlin.de> <mht8ic$20f$1@news.albasani.net> <abbreviations-20150430152141@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Thu, 30 Apr 2015 14:02:38 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="858a9d65d95f4ea4d355bd116aa2cdbf"; logging-data="24101"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0+5lvwWiJ7RG0aOvFvPls"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
In-Reply-To <abbreviations-20150430152141@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:0GmImeDGlkwbPGHD/mjZ0Z9S+m0=
Xref csiph.com comp.lang.java.programmer:31631

Show key headers only | View raw


On 4/30/2015 9:28 AM, Stefan Ram wrote:
> Sebastian <news@seyweiler.dyndns.org> writes:
>> Since Java 7, that would be Set<Character> result = new HashSet<>();
>> and there's really no repetition.
>
>    But this is difficult to remember. One can start from:
>
> HashSet<Character> result = new HashSet<Character>();

     Surely, you meant

	java.util.HashSet<java.lang.Character> result
	    = new java.util.HashSet<java.lang.Character>();

;-)

>    . Now, we want to generalize and omit some specializations
>    (details):
>
> Set<Character> result = new HashSet<>();
>
>    We have to omit the »Hash« on the left, but the »Character«
>    on the right!

     Not a fair criticism, I'd say.  "Hash" is not a specialization,
nor even a "thing" in its own right: It is merely a few characters
extracted from an identifier.  In

	class Settler<T> implements Set<T> {...}

	Set<Character> result = new Settler<>();

... would it be in any sense useful to describe the LHS as being
derived from the RHS by the omission of "tler"?

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: What is your favorite WC++IETJ? Sebastian <news@seyweiler.dyndns.org> - 2015-04-30 14:52 +0200
  Re: What is your favorite WC++IETJ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-04-30 10:03 -0400
  Re: What is your favorite WC++IETJ? Jerry Stuckle <jstucklex@attglobal.net> - 2015-04-30 12:18 -0400
  Re: What is your favorite WC++IETJ? Robbie Brown <rob@example.com> - 2015-04-30 20:37 +0100

csiph-web