|
-
June 17th, 2006, 03:05 PM
#1
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...
-
June 17th, 2006, 04:09 PM
#2
Re: object type
 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
-
June 17th, 2006, 04:13 PM
#3
Re: object type
 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
-
June 17th, 2006, 04:15 PM
#4
Re: object type
 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
-
June 17th, 2006, 04:44 PM
#5
Re: object type
 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."
-
June 17th, 2006, 11:43 PM
#6
Re: object type
Yes, I mean non-typed languages, and I am already 71 years old
...Dr Walker...
-
June 18th, 2006, 02:44 AM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|