[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [suggestion] assert: accept functions as "message"-argument
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 17 Jan 2013 11:02:35 +0200
2013/1/17 GrayFace <firstname.lastname@example.org>:
> I'm clueless why you would need it.
> assert(<condition>, function()
> return "hell".."o"
> if <condition> then
> error "hell".."o"
> Second is better in every possible way.
> In your example of an externally declared function you can as easily make a
> my_check(something, errorcode)
> Again it appears to be much nicer.
> Best regards,
> Sergey Rozhenko mailto:email@example.com