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?

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: What is your favorite WC++IETJ?
Date 2015-04-30 10:03 -0400
Organization A noiseless patient Spider
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>

Show all headers | 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