Jump to content
Developer Wiki and Function Reference Links ×

Relationship between Marionette, Python, and standard programming languages


P Retondo

Recommended Posts

Jim, after looking into it I can see that Python, though not directly compilable, is a programming language, not a macro language. This helps me adjust my approach to following the online demos - I need to stop thinking in C++.

Speaking of which, I asked the question, "how do we know the type of an argument" based on my knowledge of C, where variables are declared with a type, such as "Int". Now I understand that variables in Python are not declared with a type - or at least that appears to be the case from a very cursory look at things. I guess I'll figure out along the way how that works. In C, if you reference the wrong variable type when calling a function, that results in a compiler error that is explicitly called out. Not sure what happens when you plug in a real number in a Python / Marionette function that needs an integer.

Edited by P Retondo
Link to comment

Python is a "Dynamically Typed" language. Values are typed, not variables. So, you can assign a value of any type to a variable x for example and then later assign a value of a completely different type to x. What this implies is that there is no static type checking during compilation, it is done at run-time. This allows you a lot of freedom in your code. The drawback is that you will not catch these type errors until the program is run.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...