Pages: 1 2 3 [4]
|
|
|
Author
|
Topic: Programming (Read 6785 times)
|
Megagun
Enlightened
Offline
Gender:
Posts: 580
Moo
|
Perhaps I'm not understanding you correctly, but you seem to be suggesting that you need to constantly look up how to use different data types properly, and as a result, Python is difficult because it doesn't show you this information unless you look it up in the manual or search for it with help(). If I am misunderstanding, please correct me.
I think it's more a question of not being easily able to determine which type you need to look up. In a statically typed language, determining the type of a value is easy (even if not explicitly declared). In a dynamically typed language, this may be impossible. Hence, when you're working with a complex set of objects that refer to objects and return other objects from their methods, static typing can make it a lot easier to keep track of what type of value you have at a given point in your program. Not only does this allow an IDE to provide helpful features like auto-complete, it also makes a lot of bugs detectable at compile-time. Yeah, exactly. I usually know pretty well the things I can do with strings, ints, dicts, etc; but not the things I can do with $CLASS_I_HAVE_NEVER_HEARD_OF. Java IDEs make exploring those unknown classes easy, but Python IDEs.
|
|
|
Logged
|
|
|
|
onpon4
Enlightened
Offline
Gender:
Posts: 709
Sharing is good.
|
Perhaps I'm not understanding you correctly, but you seem to be suggesting that you need to constantly look up how to use different data types properly, and as a result, Python is difficult because it doesn't show you this information unless you look it up in the manual or search for it with help(). If I am misunderstanding, please correct me.
I think it's more a question of not being easily able to determine which type you need to look up. In a statically typed language, determining the type of a value is easy (even if not explicitly declared). In a dynamically typed language, this may be impossible. Hence, when you're working with a complex set of objects that refer to objects and return other objects from their methods, static typing can make it a lot easier to keep track of what type of value you have at a given point in your program. Not only does this allow an IDE to provide helpful features like auto-complete, it also makes a lot of bugs detectable at compile-time. Yeah, exactly. I usually know pretty well the things I can do with strings, ints, dicts, etc; but not the things I can do with $CLASS_I_HAVE_NEVER_HEARD_OF. Java IDEs make exploring those unknown classes easy, but Python IDEs. All you have to do in Python is use IDLE to edit your source code instead of some other obscure IDE. Simply enter i.e. help('module.classname') in interactive mode to look up a class. Since an interactive window is usually always open in IDLE, this is a simple matter of switching windows for a moment.
|
|
|
Logged
|
|
|
|
Megagun
Enlightened
Offline
Gender:
Posts: 580
Moo
|
That still doesn't get around the "knowing what class a given variable has" issue, though.. And if I have to read source code to find that out, I might aswell read the sourcecode of the class in question.
Also, Eclipse, obscure?
|
|
|
Logged
|
|
|
|
|
Pages: 1 2 3 [4]
|
|
|
|
|