[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [BUG] Table constructor not equivalent to left-to-right assignment
- From: Miles Bader <miles@...>
- Date: Sun, 22 Apr 2012 07:56:31 +0900
Robert Virding <robert.virding@erlang-solutions.com> writes:
> I personally think that having things undefined, implementation
> specific, and still not illegal is a Bad Thing (tm).
...
> No, it is worth converting undefined to error generating illegal.
Such a guarantee comes with a cost, which can sometimes be very high;
detecting violations can be quite hard / expensive, or even
impossible.
In some cases the cost is clearly worth it -- mistakes which are very
easy for a user to make, and easy to detect -- but in others, it is
not: for instance, situations which are costly to detect and only
result from obviously silly or extremely unlikely user code.
Obviously there's lots of stuff "in the middle" which needs a
judgement call, and given Lua's target market, I think the Lua devs
have done a pretty reasonable job of that.
-miles
--
「寒いね」と話しかければ「寒いね」と答える人のいるあったかさ [俵万智]