[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- 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 <lkppo@free.fr> 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
function foo()
return 'alice', 16
end
And an IDE is _particularly_ interested in return type annotations.....
steve d.