Re: PostgreSQL 8.0 Feature List? - Mailing list pgsql-general
From | Dave Cramer |
---|---|
Subject | Re: PostgreSQL 8.0 Feature List? |
Date | |
Msg-id | 1092661963.1550.74.camel@localhost.localdomain Whole thread Raw |
In response to | Re: PostgreSQL 8.0 Feature List? (Richard Welty <rwelty@averillpark.net>) |
Responses |
Re: PostgreSQL 8.0 Feature List?
|
List | pgsql-general |
Richard, Actually, I think you will find that current implementations of java will actually take String foo = "Hello " + "World" and rewrite it into String foo = new StringBuffer("Hello").append("World").toString() But your point is still valid. Dave On Sat, 2004-08-14 at 14:27, Richard Welty wrote: > On Sat, 14 Aug 2004 12:03:21 -0400 Jan Wieck <JanWieck@Yahoo.com> wrote: > > > On 8/12/2004 8:53 PM, Richard Welty wrote: > > > > On Thu, 12 Aug 2004 14:36:13 -0400 Vivek Khera <khera@kcilink.com> wrote: > > >> >>>>> "RW" == Richard Welty <rwelty@averillpark.net> writes: > > >> RW> i'm quite experienced in C and Java, so it's going to be in one of > > >> RW> those two. any comments from anyone on the language choice? > > > > > >> eRServer is written in Java. It sucks up about 200Mb+ virtual memory > > >> for a teeny-tiny little database. I'd avoid java :-) > > > > > > java often sucks up too much memory. java doesn't have to suck > > > up too much memory, it just usually gets written that way. > > > Right. The garbage collection automatically taking care of unreferenced > > objects as a stop-gap for resource leakage is abused by lazy programmers > > as a general purpose cleanup mechanism. > > some of it is this, certainly. some of it is bad education. > > i was a professional lisp programmer for some 10+ years. lisp, of > course, has the ancestral garbage collection scheme, and the > lisp garbage collectors at this juncture are very, very, very good, > much more mature than java's garbage collector. nonetheless, > lisp programmers who understand what is going on are exceedingly > careful not to taunt the garbage collector if they want their app to > go fast. > > the authors of 98%-99% of all introductory java textbooks have > a lot to answer for. my favorite example of the lot is that > they all teach programmers to use String in the following manner: > > String query > = "SELECT foo " > + "FROM bar " > + "WHERE baz = 'bletch';" > > return query; > > nowhere do these books ever mention StringBuffer. now java > programmers who have developed a sufficient clue set know that > String is hopelessly inefficient and will instead write the much > preferable: > > StringBuffer query = new StringBuffer(); > > query.append( "SELECT foo "); > query.append( "FROM bar "); > query.append( "WHERE baz = 'bletch';" > > return new String( query); > > which not only is much more efficient, but Does Not > Taunt The Garbage Collector. > > i kind of like _Practical Java_ (Peter Haggar, Addison Wesley) > for its coverage of these details, as well as _Bitter Java_ > (Bruce Tate, Manning) for its discussion of how naive programmers > writing Java web apps can (and often do) go seriously wrong > (it talks a lot about efficient use of database backends, providing > relevance to PostgreSQL and this mailing list.) > > richard -- Dave Cramer 519 939 0336 ICQ # 14675561
pgsql-general by date: