Nil

nil is a magic object

There Is No Spoon

Neo with Spoon

nil is the object that means "there is no object"

Experiment

fruit = "apple"
fruit = nil
fruit.reverse

Read the error!

Errors are good

They tell you

Interpret this error:

fruit.reverse
NoMethodError: undefined method `reverse' for nil:NilClass

null pointer errors

If You're Going To Fail...

Two philosophies:

Which idea is better?

Why or why not?

Fail Fast, Fail Often

The Command Line   Variables

Outline

[contents]

Nil Slides - Code Like This

/

#