You're not a link farm if you have a directory. But sites with little to no reputation (a.k.a trust) with Google that exchanges links with a site that is considered to be a part of a link farm run the risk of being considered part of that link farm. Naturally that's a great reason to be banned from Google. So if the site is new and/or very small running a reciprocal link directory can potentially be harmful to their rankings.
But for a "good" link, The only relevant directory is Dmoz.
1 link in dmoz equal hundred's "bad" links
or a quality link provided by a specialized directory
Like "daniweb.com/directory" is certainly recognized by search engines
for an it directory specialist.