Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

A large list of "harmful stuff" related to software development is presented on cat -v. Is Qt harmful? What would be the rationale for considering to Qt harmful? Why would Tcl/Tk be presented as a superior alternative?

share|improve this question
    
Commenters: comments are meant for seeking clarification, not for extended discussion. If you have a solution, leave an answer. If your solution is already posted, please upvote it. If you'd like to discuss this question with others, please use chat. See the FAQ for more information. –  user8 May 23 '11 at 19:48
add comment

closed as not constructive by ChrisF Sep 20 '11 at 11:09

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

up vote 8 down vote accepted

That site is designed around the idea of simple implementations, rather than simple interfaces. This is referred to on that site as Unix style design vs MIT style design.

As such, Qt is "considered harmful" because it strives to offer as simple an interface as possible, whilst increasing internal complexity. For example, QStrings share memory internally, under some circumstances, when copied. Tell me that's expected behavior and the simplest possible implementation. It's not. It's useful when you are storing large amounts of duplicate data in several QStrings, however, so the developers added that feature. As the maintainer of that website states, not implementing features is hard (paper).

Looking at the list of "harmful" software at http://harmful.cat-v.org/software/ shows this is a common pattern: The author prefers software that is simple in implementation, does one thing, and does it well. Whether or not the author is correct in their assumptions about complex software is up to the reader, and many would disagree.

Personally, I attempt to remove unnecessary complexity from programs I write when possible. However, in order to write useful software, you, as a programmer, often need to deal with such complexity as a matter of course. Your job, as said programmer, is to add the requested features with a minimal addition of complexity.

share|improve this answer
add comment

The question, at least to me, is not why it is harmful, but whether it is or isn't. I think not, actually. It is a great toolkit. Toolkits are only harmful as you won't have to learn how the stuff which goes on underneath them, but even if they exist, you are still free to do so, and you should do so. You should also use toolkits when available (most of the time, they are). This wasn't specific to Qt though, and the author listed Tcl/Tk (toolkit) as a better option, so it doesn't seem like the author is against toolkits themselves.

It might be the license (Tcl/Tk uses a much more liberal BSD license, and much of the software he bashes is under some variant of the GPL), or it might just be the author's personal preference (and he seems not be able to see anything good in other things).

The author doesn't list any points as to why he thinks Qt would be bad, and thus you can only speculate, and I can't see why Qt would be harmful. Many things on that site also raises the general question: "is the author serious, or is he just joking/trolling?". I think it is the second.

share|improve this answer
add comment

I would consider Qt harmful for its implementation.

My favorite pick is the lack of smart pointers. Memory is handled manually, and the ownership is unclear.

This lack of clear memory ownership semantics/convention in the API is harmful -- you need to read the doc... and we know every developer scrupulously read it, don't we ? and never make a mistake either, of course

A proper use of C++ idioms:

  • use smart pointers in the interface when taking ownership
  • use references when the object need be alive longer than the method call/object being built and will not be owned
  • etc...

would make for a less error-prone API, and ultimately software of better quality would be built upon it.

Apart from that, it seems the author of this site has a wry sense of humor.

share|improve this answer
    
+1. Worse, Qt is not exception safe, which means it is broken. –  Nemanja Trifunovic May 23 '11 at 18:31
    
@Matthieu M. I think the Qt developers might disagree about smart pointers based off this blog post. Qt isn't inherently harmful, it's just very large and they've attempted to get a lot of features built in, and a lot of them are very nice but there's a lot of places where less features would probably have been the best decision and kept the code base cleaner. –  Nicholas Smith Aug 19 '11 at 15:22
    
@Nicholas: sorry if I was not clear. The lack of smart pointer is not a lack of classes, but a lack of usage. They have wonderful classes (scoped, strong/weak), even a generic way of implementing COW (wow!). If you read on QScopedPointer: "we needed a way to free resources without writing try/catch everywhere". I don't understand why this only came up with Symbian, most of the code I saw was leaky in the presence of exceptions because there was no smart pointer used in it... –  Matthieu M. Aug 19 '11 at 16:17
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.