The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 11, 2024, 03:56:44 am
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Starbase Café (Moderator: Death 999)
| | |-+  Programming
« previous next »
Pages: 1 2 3 [4] Print
Author Topic: Programming  (Read 6785 times)
Megagun
Enlightened
*****
Offline Offline

Gender: Male
Posts: 580


Moo


View Profile
Re: Programming
« Reply #45 on: August 22, 2010, 02:31:07 pm »

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 Offline

Gender: Male
Posts: 709


Sharing is good.


View Profile WWW
Re: Programming
« Reply #46 on: August 22, 2010, 03:08:06 pm »

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 Offline

Gender: Male
Posts: 580


Moo


View Profile
Re: Programming
« Reply #47 on: August 22, 2010, 04:53:55 pm »

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
onpon4
Enlightened
*****
Offline Offline

Gender: Male
Posts: 709


Sharing is good.


View Profile WWW
Re: Programming
« Reply #48 on: August 22, 2010, 05:50:29 pm »

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.

Can you give an example? I'm still not understanding quite what the issue is.
Logged

Pages: 1 2 3 [4] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!