lua-users home
lua-l archive

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


On Friday, April 25, 2014 02:37:46 PM steve donovan wrote:
> On Fri, Apr 25, 2014 at 2:13 PM, Coroutines <coroutines@gmail.com> wrote:
> > Ruby also makes it convention to put ! at the end of the function name
> > if if modifies its `self'.  The non-! version returns a modified copy.
> 
> That's a fine convention, but then everyone must use the convention
> consistently and idiomatically.  An enormous amount of code must then
> be rewritten.  It's an option for a new language, but not for a
> twenty-year old.

I've sometimes wondered about the "predicate?" style of naming if Spanish 
speakers wish they could type "¿predicate?" instead.

> [1] and everyone agrees that tautological documentation ("add(x,y):
> adds x and y") is worse than none at all.  JavaDoc made this style
> popular.

I've seen this said a few times. But no one has ever explained how you 
*should* document the "add" function. Other than stating the expected types of 
the arguments which your example leaves out. But how would you document 
"function isnil(value) return value == nil end" in a non-tautological way?

-- 
tom <telliamed@whoopdedo.org>