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


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

Re: Substring changes (JDK 1.7)

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Substring changes (JDK 1.7)
Date Fri, 11 Jan 2013 07:29:16 +0100
Lines 38
Message-ID <al9pq3Fua06U1@mid.individual.net> (permalink)
References <kcmg8p$7ee$1@news.albasani.net> <dk8ue8p3nml7pv1rj34ojtgtc9i9cdn80n@4ax.com> <al8rs6Fo963U1@mid.individual.net> <substrings-20130111062412@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net kyfAPO81gfstaEc5F+DCHA42zpsmRi6TotVWeiMWUUSCiPmlGFkbD3owDwkQEVQ3Q=
Cancel-Lock sha1:oYvhyDWseKBwLEPRWZok58NrUFU=
User-Agent Mozilla/5.0 (Windows NT 6.0; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0
In-Reply-To <substrings-20130111062412@ram.dialup.fu-berlin.de>
Xref csiph.com comp.lang.java.programmer:21317

Show key headers only | View raw


On 11.01.2013 06:26, Stefan Ram wrote:
> Robert Klemme <shortcutter@googlemail.com> writes:
>> On 10.01.2013 21:22, Roedy Green wrote:
>>> You no longer have to worry a about a tiny substring holding a meg+
>>> sized base string around in memory.
>> Instead you have to worry about tons of substrings drawn from the same
>> input String to occupy a lot more memory and slowing down GC.  Trade
>> offs, trade offs...
>
>    But this is more natural, it fulfills the expection of non-expert
>    programmers.

But it would be a significant change.  There is so much software written 
under the assumption of the old implementation.  That change might 
actually break existing programs (break in the sense of less performance 
or new GC issues).

Then again it might be that there are just not that many programs which 
make use of that knowledge.  Who knows?

> Expert programmers can implement a custom string class
>    with the previous behaviour,

Well, shouldn't such a basic thing be part of the standard library?

> or, - possibly better - a custom
>    implementation of CharSequence (if only more APIs would use
>    CharSequence instead of String!).

I agree.  But unfortunately public classes and APIs are set in stone.

Kind regards

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

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


Thread

Substring changes (JDK 1.7) Jan Burse <janburse@fastmail.fm> - 2013-01-10 14:38 +0100
  Re: Substring changes (JDK 1.7) markspace <markspace@nospam.nospam> - 2013-01-10 08:15 -0800
    Re: Substring changes (JDK 1.7) Joshua Cranmer <Pidgeot18@verizon.invalid> - 2013-01-10 10:48 -0600
      Re: Substring changes (JDK 1.7) markspace <markspace@nospam.nospam> - 2013-01-10 09:22 -0800
        Re: Substring changes (JDK 1.7) Lars Enderin <lars.enderin@telia.com> - 2013-01-10 19:35 +0100
  Re: Substring changes (JDK 1.7) Jan Burse <janburse@fastmail.fm> - 2013-01-10 20:08 +0100
    Re: Substring changes (JDK 1.7) Jan Burse <janburse@fastmail.fm> - 2013-01-10 20:12 +0100
  Re: Substring changes (JDK 1.7) Roedy Green <see_website@mindprod.com.invalid> - 2013-01-10 12:22 -0800
    Re: Substring changes (JDK 1.7) Robert Klemme <shortcutter@googlemail.com> - 2013-01-10 22:58 +0100
      Re: Substring changes (JDK 1.7) Roedy Green <see_website@mindprod.com.invalid> - 2013-01-10 15:20 -0800
      Re: Substring changes (JDK 1.7) Robert Klemme <shortcutter@googlemail.com> - 2013-01-11 07:29 +0100
        Re: Substring changes (JDK 1.7) Roedy Green <see_website@mindprod.com.invalid> - 2013-01-10 23:19 -0800
          Re: Substring changes (JDK 1.7) Robert Klemme <shortcutter@googlemail.com> - 2013-01-12 17:50 +0100
            Re: Substring changes (JDK 1.7) markspace <markspace@nospam.nospam> - 2013-01-12 09:59 -0800
              Re: Substring changes (JDK 1.7) Jan Burse <janburse@fastmail.fm> - 2013-01-12 19:14 +0100
                Re: Substring changes (JDK 1.7) markspace <markspace@nospam.nospam> - 2013-01-12 10:36 -0800
                Re: Substring changes (JDK 1.7) Jan Burse <janburse@fastmail.fm> - 2013-01-13 12:09 +0100
    Re: Substring changes (JDK 1.7) Jan Burse <janburse@fastmail.fm> - 2013-01-11 09:23 +0100
      Re: Substring changes (JDK 1.7) "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-01-11 08:29 +0000
        Re: Substring changes (JDK 1.7) Jan Burse <janburse@fastmail.fm> - 2013-01-11 10:56 +0100
          Re: Substring changes (JDK 1.7) Jan Burse <janburse@fastmail.fm> - 2013-01-11 14:30 +0100

csiph-web