Skip to main content

Comments on "Easy String Concatenation Considered Harmful?"

Posted by bernt on September 28, 2005 at 2:15 PM PDT

I received some interesting comments on Easy String Concatenation Considered Harmful? and want to comment some of them.

I too love the easy string concatenation of Java. But ease of use and the readable code that comes from it will very often hinder the programmer from seeing the problem when it occurs.

I also agree that performance optimization should not be a developers first concern. But my article was written from my experience that when programmers encounters performance problems, lack of prepared statements (and their re-use) often is the problem.

And using persistence layers isn't always the cure, since I've seen auto-generated code with the same flaw. And then, you can't just get around it easily without either choosing another persistence layer or fixing the the persistence layer.

And, yes, "select * from...." is bad practice and due to my laziness when composing the article.

Related Topics >>