[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Suggestion: Lua 5.3 -- Named Return Values
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 20 Nov 2013 16:54:52 +0200
On Wed, Nov 20, 2013 at 4:03 PM, Stéphane Aulery <email@example.com> wrote:
having to worry about re-read the code. I can comment on each return
value to know for example that it is an error code but it will not be
exploited by an IDE and prone to problems inerrant comments.
It is totally possible to teach IDE's to understand doc comments -
this is the approach actually taken by the Eclipse Lua plugin. LDoc
syntax is different from theirs (pity) but the pay-off to writing
careful doc comments is that you get a better IDE experience.
-- does the foo.
-- @treturn string name
-- @treturn int age
return 'alice', 16
And an IDE is _particularly_ interested in return type annotations.....