[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Exposure of nil to end-users
- From: Mikko Sivulainen <mikko.sivulainen@...>
- Date: Thu, 05 Feb 2009 12:13:31 +0200
Ben Harper wrote:
I am using Lua as a language that allows end-users to manipulate
My problem is that I'm not sure how to expose NULL values to the user.
In this example, value = nil
User Types: value .. "abc"
User Expects: 'abc'
User Gets: Error: attempt to concatenate a nil value
Has anybody had a similar problem, and how have you dealt with it?
I find myself using a lot of:
value = value or ""
when nil is not an option.