Results 1 to 2 of 2
  1. #1
    hitesh_public is offline Member
    Join Date
    Aug 2010
    Posts
    9
    Rep Power
    0

    Default Are abstraction and encapsulation concepts not in C?

    Hello friends,

    We always hear that abstraction and encapsulation concepts are two properties of object oriented programming languages, but if we talk about C, then a function is able to hide complexity. Is this not abstraction? We just need function's name to use it and not the implementation details.

    About encapsulation I am more sure that it is not in procedural languages as it is the binding of code and data. Nevertheless I will like to discuss about it too.

    Thanks

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,520
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by hitesh_public View Post
    Hello friends,

    We always hear that abstraction and encapsulation concepts are two properties of object oriented programming languages, but if we talk about C, then a function is able to hide complexity. Is this not abstraction? We just need function's name to use it and not the implementation details.

    About encapsulation I am more sure that it is not in procedural languages as it is the binding of code and data. Nevertheless I will like to discuss about it too.

    Thanks
    Yes, functions are a form of abstraction; using opaque structs is a form of data hiding and C uses it all the time. The OO religion just tries to make it its own concepts but C already has them ;-)

    kind regards,

    Jos

Similar Threads

  1. Abstraction
    By maya700 in forum New To Java
    Replies: 4
    Last Post: 07-04-2010, 06:26 PM
  2. diff between abstraction and inheritance
    By sandeepsai17 in forum New To Java
    Replies: 4
    Last Post: 05-24-2010, 06:04 AM
  3. Abstraction
    By anurag in forum New To Java
    Replies: 6
    Last Post: 05-15-2010, 06:15 PM
  4. encapsulation & constructors
    By buckskinner1776 in forum New To Java
    Replies: 4
    Last Post: 05-10-2010, 06:35 PM
  5. java-Encapsulation
    By lenah in forum Advanced Java
    Replies: 5
    Last Post: 01-05-2009, 09:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •