[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: "noreturn" attribute in lua_error & Co
- From: Coda Highland <chighland@...>
- Date: Thu, 19 Apr 2012 13:09:50 -0500
>> Suppose you're a company that has Lua embedded into their system. Then
>> suppose you hire a new employee that's never worked with the Lua API
>> before.
>
>
> I'll let him crash & burn, so he would learn :) Eventually he'll learn and
> get it right. He'll develop a style, and maybe push it onto others, at least
> teach them (right or wrong).
If only it were that easy! No, that's going to be the kind of thing
that introduces subtle errors from incorrect assumptions and you might
not notice it for a very long time. If it crashed and burned there'd
be an obvious failure.
>> Which is going to be better for that developer -- marking every exit
>> point from a C function with "return", or leaving some implicit while
>> others are explicit?
>
> Hell if I know! "Which is better for a developer" - is the quesion to which
> we have so many answers - languages, runtimes, operating systems,
> frameworks, etc.
I said "that" developer -- citing a specific example. In this case, it
seems pretty clear that you want to make the code self-documenting.
/s/ Adam