Answer the question
In order to leave comments, you need to log in
Does a large number of typedefs negatively affect anything meaningful?
I use typedef as a shorthand for overly long constructs. For example these:
typedef boost::function<void(std::shared_ptr<event>)> event_handler;
Answer the question
In order to leave comments, you need to log in
There is a problem in general. If you write something only for yourself in 1000 lines, then everything is OK, but if there is a possibility that other people will edit your code later, then think 100 times before using typedef. The person who will then accompany this will be very painful in different parts of the body. So he sees "event_handler" in the code ... and what it is and where it is, he will start spending time studying what should follow from the code itself.
You can abandon definitions in favor of copy-paste types. It's easier and clearer
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question