Ruby Flashcards
Adding a feature to a programming language to make it easier to do something that was already doable is called adding ANSWER.
syntactic sugar
Matz, the creator of Ruby thinks that it is less important to optimize the execution (efficiency) of a programming language and more important to optimize the efficiency of ANSWER
the programmers
A programming language is called ANSWER if it is executed by an interpreter rather than by first being compiled with a compiler.
interpreted
If the types of a programming language are bound at execution time rather than compile time, then the types are called ANSWER.
dynamically typed
In describing the properties of an object oriented language, encapsulation means ANSWER.
Data and behaviour are packaged together
There is a mechanism for restricting access to an object’s components
In discussing object oriented languages objects are organized into a class tree to support the property of ANSWER.
inheritance
In discussing object oriented languages being able to handle objects of related type is called ANSWER.
Polymorphism
(Polymorphism has a different usage in the object oriented programming community than in the functional programming community)
The application that caused a significant increase in the popularity of Ruby was a web framework called ANSWER.
Rails
The concurrency approach used in Ruby is ANSWER.
threads
The command name for the ruby interpreter is ANSWER.
irb
In ruby true.class returns ANSWER
TrueClass
Ruby supports two common ways that boolean expressions are handled in programming languages. In one approach both subexpressions of a boolean operator are evaluated before the boolean operator is evaluated. In the other approach called ANSWER the first subexpression in a boolean expression is evaluated and if that is enough to know the result of the boolean expression, then the second subexpression is not evaluated.
short-circuit evaluation
In ruby normally when you try to add a String to a Fixnum, you get an error message saying that a String cannot be coerced to a Fixnum. This is because Ruby is ANSWER typed.
strongly
One way of checking types is to see what constructor was used to create an object that is a parameter. Another way of checking types is to wait until a method is sent to an object and see if it supports the methods. This second way is called ANSWER.
duck typing
A major claim in object oriented design philosophy is that you should code to ANSWER rather than code to implementation.
interface