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


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

Re: hashtables syntax

Newsgroups comp.lang.java.programmer
Date 2016-05-16 16:10 -0700
References <nh954m$bu8$1@reader1.panix.com> <nh9n7r$ira$1@dont-email.me> <338d0b8c-9a5e-ccc0-9a5c-792c870f84bf@mrbrklyn.com>
Message-ID <f8a4d1b8-1a31-4ac9-aa6a-3eaec480e2bc@googlegroups.com> (permalink)
Subject Re: hashtables syntax
From Lew <lewbloch@gmail.com>

Show all headers | View raw


ruben safir wrote:
> Gotchya, but it seems inconsistent.

Based on what? Your personal prejudices? There is no engineering rationale for your concern, and saying "it seems" is a weasel-wording for "I have decided that it is", with an implication that somehow this is not your personal and unfounded opinion.

Each programming language has to be taken according to its own lights. I don't know how you have decided that this idiom is "inconsistent", or what "consistent" is in your world, but in fact the syntax is entirely consistent. It is consistent with the definition of the language.

> why not like
> 
> HashMap<> function = new HashMap<String, Type[]>

Because that is not legal syntax in Java.

> Why declare function as a type at all.

Umm, what? Everything in Java has a type. What language did you think we are discussing?

It's also not usually a great idea to mix arrays and generics in Java.

-- 
Lew

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


Thread

hashtables syntax Popping mad <rainbow@colition.gov> - 2016-05-15 06:31 +0000
  Re: hashtables syntax Lew <lewbloch@gmail.com> - 2016-05-14 23:52 -0700
    Re: hashtables syntax Popping mad <rainbow@colition.gov> - 2016-05-15 10:23 +0000
      Re: hashtables syntax Lew <lewbloch@gmail.com> - 2016-05-15 09:33 -0700
        Re: hashtables syntax Lew <lewbloch@gmail.com> - 2016-05-15 09:35 -0700
      Re: hashtables syntax Eric Douglas <e.d.programmer@gmail.com> - 2016-05-16 06:10 -0700
  Re: hashtables syntax Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-15 07:44 -0400
    Re: hashtables syntax ruben safir <ruben@mrbrklyn.com> - 2016-05-16 01:26 -0400
      Re: hashtables syntax Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-16 07:48 -0400
        Re: hashtables syntax Steven Simpson <ss@my.domain.invalid> - 2016-05-16 15:51 +0100
          Re: hashtables syntax Steven Simpson <ss@my.domain.invalid> - 2016-05-16 22:35 +0100
      Re: hashtables syntax Lew <lewbloch@gmail.com> - 2016-05-16 16:10 -0700
  Re: hashtables syntax Andreas Leitgeb <avl@logic.at> - 2016-05-15 13:43 +0000
  Re: hashtables syntax Roedy Green <see_website@mindprod.com.invalid> - 2016-05-20 18:00 -0700

csiph-web