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


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

Re: Static type checking: hybrid mode in Groovy

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Gene Wirchenko <genew@ocis.net>
Newsgroups comp.lang.java.programmer
Subject Re: Static type checking: hybrid mode in Groovy
Date Thu, 17 Nov 2011 11:02:39 -0800
Organization A noiseless patient Spider
Lines 26
Message-ID <agmac7do881omd5af4mj7itrkmg10o6hav@4ax.com> (permalink)
References <61e17074-e229-4303-a549-2389ccf502d3@m10g2000vbc.googlegroups.com> <im8ac7t9bge5464b2aesgsnqd6qmf553c8@4ax.com> <4njac7ttrpfca17vtgcesuq9buli0hgls3@4ax.com> <ja3k0o$9jv$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="19504"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Ef+bqqJ8+Qz5cg9J8offn0RyfUJg9G34="
X-Newsreader Forte Agent 4.2/32.1118
Cancel-Lock sha1:STumzEnbjkKEuQ19uEm8sAlOCIc=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10014

Show key headers only | View raw


On Thu, 17 Nov 2011 10:32:54 -0800, markspace <-@.> wrote:

>On 11/17/2011 10:25 AM, Gene Wirchenko wrote:
>> written was something like:
>>            if (cParsedWord=="$define")
>> Instead, I had to write:
>>            if (cParsedWord.equals("$define"))
>> Without that method, it was something like:
>>            if (cParsedWord.Value.toString().equals("$define"))

>In all honesty, I prefer the last one.  At least I can see what is going 
>on, and I don't think it is long at all.  There are plenty of good 
>examples where Java is verbose.  This isn't one of them.

     Um, the condition is twice the length of other languages'
equivalents.

>And overriding "equals" in this way is pernicious.

     Why?  I was checking for equality.

[snip]

Sincerely,

Gene Wirchenko

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


Thread

Static type checking: hybrid mode in Groovy Robert Klemme <shortcutter@googlemail.com> - 2011-11-16 00:41 -0800
  Re: Static type checking: hybrid mode in Groovy Roedy Green <see_website@mindprod.com.invalid> - 2011-11-17 07:16 -0800
    Re: Static type checking: hybrid mode in Groovy Lew <lewbloch@gmail.com> - 2011-11-17 09:28 -0800
      Re: Static type checking: hybrid mode in Groovy Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-18 08:16 +0000
      Re: Static type checking: hybrid mode in Groovy Roedy Green <see_website@mindprod.com.invalid> - 2011-11-18 02:32 -0800
        Re: Static type checking: hybrid mode in Groovy Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-18 07:35 -0400
        Re: Static type checking: hybrid mode in Groovy Lew <lewbloch@gmail.com> - 2011-11-18 07:23 -0800
    Re: Static type checking: hybrid mode in Groovy Gene Wirchenko <genew@ocis.net> - 2011-11-17 10:25 -0800
      Re: Static type checking: hybrid mode in Groovy markspace <-@.> - 2011-11-17 10:32 -0800
        Re: Static type checking: hybrid mode in Groovy Gene Wirchenko <genew@ocis.net> - 2011-11-17 11:02 -0800
  Re: Static type checking: hybrid mode in Groovy Robert Klemme <shortcutter@googlemail.com> - 2011-11-19 11:49 +0100

csiph-web