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


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

Re: "Double.toString"

From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: "Double.toString"
Date 2016-11-24 11:12 -0500
Organization Aioe.org NNTP Server
Message-ID <o173hl$jm9$1@gioia.aioe.org> (permalink)
References <Double-toString-20161119164723@ram.dialup.fu-berlin.de> <o0s8u2$rj6$1@dont-email.me> <1u072gaozj278$.dlg@kimmeringer.de> <9a71ae21-aa0e-4ee6-930f-b7b871a8d7cc@googlegroups.com> <1gcla4rjhg12u.dlg@kimmeringer.de>

Show all headers | View raw


On 11/24/2016 8:07 AM, Lothar Kimmeringer wrote:
> lewbloch@gmail.com wrote:
>> The number of objects created is very unlikely to present
>> an issue. The `StringBuilder` will be GCed painlessly, and
>> the HotSpot is likely to optimize away a whole lot of that
>> anyway. Let's not panic about the negligible putative
>> differences in performance and focus on clarity and
>> maintainability of the source.
>
> IMHO
> myString = "" + myDouble
> is less readable than
> myString = Double.toString(myDouble);
> But that's IMHO, YMMV

I think the concatenation and implicit conversion is very
readable (similar constructs are frequently used). But it
do bother my aesthetic feelings (I don't like implicit
conversion).

Arne

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


Thread

Re: "Double.toString" Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-11-20 08:37 -0500
  Re: "Double.toString" Lothar Kimmeringer <news200709@kimmeringer.de> - 2016-11-20 22:49 +0100
    Re: "Double.toString" Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-11-21 08:25 -0500
    Re: "Double.toString" lewbloch@gmail.com - 2016-11-22 15:10 -0800
      Re: "Double.toString" Lothar Kimmeringer <news200709@kimmeringer.de> - 2016-11-24 14:07 +0100
        Re: "Double.toString" Arne Vajhøj <arne@vajhoej.dk> - 2016-11-24 11:12 -0500
        Re: "Double.toString" lewbloch@gmail.com - 2016-11-27 08:16 -0800
        Re: "Double.toString" Eric Douglas <e.d.programmer@gmail.com> - 2016-11-28 05:34 -0800

csiph-web