CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: object type

  1. #1
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    13

    Question object type

    why do sometimes people need to understand what type of the object they are dealing with ? i am a professional programmer for over 20 years and has finished over 16 big projects for Australian army but I have never done anything relating to object types.

    Thankyou
    Regards,
    Deniel Walker
    ( Dr Walker )
    ...Dr Walker...

  2. #2
    Join Date
    Mar 2006
    Location
    You can guess, but it'll be wrong
    Posts
    12

    Re: object type

    Quote Originally Posted by Onlyone5
    why do sometimes people need to understand what type of the object they are dealing with ?
    From the coder's viewpoint, it is for the substitution mechanisms to be much easier...
    Emiene Vous

  3. #3
    Join Date
    Apr 1999
    Posts
    27,449

    Re: object type

    Quote Originally Posted by Emiene
    From the coder's viewpoint, it is for the substitution mechanisms to be much easier...
    Now if you can explain what "substitution mechanism" is supposed to mean, everyone will be grateful.

    Regards,

    Paul McKenzie

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: object type

    Quote Originally Posted by Onlyone5
    why do sometimes people need to understand what type of the object they are dealing with ?
    Most of the time, it's because the programmer has designed their classes poorly, or they are not aware of virtual functions and polymorphism.

    Regards,

    Paul McKenzie

  5. #5
    Join Date
    Jun 2002
    Location
    Moscow, Russia.
    Posts
    2,176

    Re: object type

    Quote Originally Posted by Onlyone5
    why do sometimes people need to understand what type of the object they are dealing with ? i am a professional programmer for over 20 years and has finished over 16 big projects for Australian army but I have never done anything relating to object types.
    You mean non-typed languages?
    "Programs must be written for people to read, and only incidentally for machines to execute."

  6. #6
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    13

    Re: object type

    Yes, I mean non-typed languages, and I am already 71 years old
    ...Dr Walker...

  7. #7
    Join Date
    Jun 2002
    Location
    Moscow, Russia.
    Posts
    2,176

    Re: object type

    There're good discussions about that at artima.
    http://www.artima.com/forums/flat.js...t=0&msRange=15
    http://www.artima.com/forums/flat.js...t=0&msRange=15
    http://www.artima.com/forums/flat.js...t=0&msRange=15

    Personally I see static typing as documentation and tests. As documentation, type system is understandable by automatic tools which enables some good magic. As static tests, it prevents many errors at compile time. Such tests are better defined then it'd be possible for dynamic types and enable quick (local) reanalysis. Both points make programmer more productive.
    On the other side, static typing makes code more verbose, and it lowers productivity. So decision depends on type of project. I think projects with non-trivial structure benefit from static typing.
    "Programs must be written for people to read, and only incidentally for machines to execute."

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured