CSC/ECE 517 Fall 2009/wiki1a 11 f1,: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Ruby and Python are both scripting languages whose popularity has sky rocketed in recent years. Both languages are High-level, Garbage-collected, and Dynamically-typed. Both provide an interactive shell, standard libraries, and persistence support. So, what are the differences? | Ruby and Python are both scripting languages whose popularity has sky rocketed in recent years. Both languages are High-level, Garbage-collected, and Dynamically-typed. Both provide an interactive shell, standard libraries, and persistence support. So, what are the differences? | ||
Points of comparison: | Points of comparison: | ||
* Language Features | * Language Features | ||
Line 6: | Line 7: | ||
* Advantages of each over statically typed languages | * Advantages of each over statically typed languages | ||
* Projects environments suited to each | * Projects environments suited to each | ||
==Language Features== | |||
===Private methods and variables === | |||
To make methods and instance variables private in Python, one '''always''' needs to write __ in front of the name. In Ruby, instance variables are private by default. Methods defined after the method call private are private. |
Revision as of 03:10, 5 September 2009
Ruby and Python are both scripting languages whose popularity has sky rocketed in recent years. Both languages are High-level, Garbage-collected, and Dynamically-typed. Both provide an interactive shell, standard libraries, and persistence support. So, what are the differences?
Points of comparison:
- Language Features
- Web programming environments
- Features exclusive to each
- Advantages of each over statically typed languages
- Projects environments suited to each
Language Features
Private methods and variables
To make methods and instance variables private in Python, one always needs to write __ in front of the name. In Ruby, instance variables are private by default. Methods defined after the method call private are private.