By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Advantages and Disadvantages of exposing interfaces through Opaque data types in C

P: 1

I am trying to figure out the advantages and disadvantages of exposing interfaces through Opaque data types in C. I have figured/found out the following two advantages

1. Higher level of abstraction
2. if the layout of the defined structure inside the source files changes, it will reduce/limit/minimize the amount of changes that may be needed in the code of the application that uses the library i.e. the library will itself handle the effect of the changes by enhancing the existing function definitions and possible exposing more interfaces.

Could you suggest some more advantages in this regard?

Just for your reference, I am including the following link that show how to expose an interface through opaque data types.

Thanks in advance.

Feb 6 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,197
Just get a book on C++ and read up on the advantages of:

data hiding
separating interface from implementation
design patterns
Feb 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.