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 )
[321 byte] By [Onlyone5] at [2007-11-19 22:48:16]
# 1 Re: object type
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 at 2007-11-9 1:04:05 >
# 2 Re: object type
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
Paul McKenzie at 2007-11-9 1:05:07 >
# 3 Re: object type
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
Paul McKenzie at 2007-11-9 1:06:06 >
# 4 Re: 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.You mean non-typed languages?
RoboTact at 2007-11-9 1:07:06 >
# 5 Re: object type
Yes, I mean non-typed languages, and I am already 71 years old :(
Onlyone5 at 2007-11-9 1:08:16 >
# 6 Re: object type
There're good discussions about that at artima.
http://www.artima.com/forums/flat.jsp?forum=106&thread=156197&start=0&msRange=15
http://www.artima.com/forums/flat.jsp?forum=106&thread=155960&start=0&msRange=15
http://www.artima.com/forums/flat.jsp?forum=106&thread=127941&start=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.
RoboTact at 2007-11-9 1:09:15 >