User:Pjacobi/Draft/Nulls and undefined

The NULL and/or undefined values
What is the value of variables never assigned before? And: is there a special NULL value. Are they considered to be the same.

NULL

 * ECMAScript
 * ECMAScript has distinct null and undefined, the latter is only for declared variables never assigned a value. Accessing undeclared variables raises an exception.


 * Lua
 * In Lua, the NULL value nil and the undefined state are equal. This is basically the same model as Perl, but with giving this state a name. So undefing a variable has the normal assignment syntax.

PERL has no named NULL value but undefining a variable using undef can mostly achieve the same, as using an undefined variable in boolean context is allowed (and evaluates to false).
 * PERL


 * PHP


 * Python


 * Ruby