lua-users home
lua-l archive

Re: overloading __lt, __le to return a userdefined object

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, May 20, 2011 at 1:42 PM, David Kastrup <dak@gnu.org> wrote:
> Since the behavior of short-circuit operators can't sensibly be emulated
> by a function, there is no good point to overloading them: overloading
> should not change the semantics of an operation.
This makes sense, so my rhetorical question was stupid.
The times when I felt the lack of general overloading was when
constructing general symbolic expressions, where it would be
_convenient_ for 'a < b' to evaluate as a symbolic expression. But
this feels like a fairly unusual use case and not worth messing with
the core.
steve d.

AltStyle によって変換されたページ (->オリジナル) /