Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Ted Leung on the air: Open Source, Java, Python, and ...
Thu, 10 Jul 2003
Yukihiro Matsumoto: "The Power and Philosophy of Ruby"
Matz, the author of Ruby talked about the philosophy that he used to design Ruby He told us he was inspired by Samuel R. Delany's babel-17, which described an artificial language that was so powerful that it could brainwash its users.
Some of his key ideas:
[16:50] |
[computers/programming] |
# |
TB |
F |
G |
0 Comments |
- Choosing good names
If you give a good name for a concept 80% of design is done already. We have to care about every name we name (progs, files, mods, vars...) - Understanding humanity
Man is not a machine. If you are a machine you can just talk to the machine directly (imagine modem carrier negotioation sounds). The history of languages is the history of abusing (machine) power. Build a stress graph of languages. Total stress (area under the curve) is important, but maximum stress at any given point is important too. When you see repeated errors, you have to do something. Consistency helps to form common sense. Creativity is hindered by arbitrary restriction Simplicity is NOT a goal: Things too simple are difficult and Things too complex are difficult Principle of succinctness: Fred Brooks - people can generate the same number of lines of code per day, regardless of language - Embedding Hidden Messages
There's more than one way to do it, but language can encourage one by making it more comfortable than others. Examples from Ruby:- Ruby supports mixins not multiple inheritance, hidden message: multiple inheritance is bad.
- Ruby has global variables but you must prefix them with $. Code with too many $'s is ugly, indicating a problem with your code.
- Dangerous methods have ! in name, because of side effects. This forces you to recognize that you are doing something side-effecting.
You can subscribe to an RSS feed of the comments for this blog:
Add a comment here:
You can use some HTML tags in the comment text:
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are:
You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are:
<a href>
, <em>
, <i>
, <b>
, <blockquote>
, <br/>
, <p>
, <code>
, <pre>
, <cite>
, <sub>
and <sup>
.You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk