| ruby |
WebHome | UnixGeekTools | Geekfarm | About This Site
Pointers
ApacheCon2005 - Ruby for Java Developers
- My notes
- What is ruby
- http://www.ruby-lang.org/
- interpeted scripting language for quick and easy oo
programming
- very idiomatic - lots of different ways to do things
- many features to process text files and do sys mgmt tasks
(like perl)
- simple syntax
- exception handling
- anything can redefined easily - meta programming like
smalltalk
- inspired by Eiffel, Ada, smalltalk, Java, Python, Perl
- complete, full, pure oo language
- all data is an object, no primitave types
- carefully designed to be complete and open for
improvement
- single inheritance language - on purpose
- mixins - some of the benefits of multiple inheritance
without the problems
- loose syntax - encourages very readable code
- parens for methods are optional
- true closures
- true mark-and-sweep garbage collection
- no variable declarations
- var_name - local
- @var_name - instance variable
- @@var_name - class variable
- VAR_NAME - gobal
- OS independent thrading
- highly portable
- documentation
- english reference manual is very outdated (japanese)
- http://www.ruby-doc.org/ has up-to-date RubyDocs and other
resources
- the pick-axe book
- syntax - see slides
- access control
- public - default
- protected - only objects of class or subclass
- private
- can be called only in the defining class and by direct
descendents within that same object
- can only be called by an instance of the defining class
or subclass
;
Updated Sat Jan 20, 2007 3:16 PM