Wiki changes

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Wiki changes

Post by Inny »

I like the look to the "Available since LÖVE" box, pretty smooth. However, bunching up functions with multiple meanings for the parameter list is something you'll have to be very careful about. In the case of love.keyboard.isDown, there's only one meaning to the function, so it's probably okay to bunch it there (or list the other ways to use it as one section), but with other functions that can take a wide variety of parameter, please keep it separated out.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Wiki changes

Post by Robin »

Inny wrote:In the case of love.keyboard.isDown, there's only one meaning to the function, so it's probably okay to bunch it there (or list the other ways to use it as one section), but with other functions that can take a wide variety of parameter, please keep it separated out.
And doing it sometimes this way and sometimes that way is awfully inconsistent, let's not do that.
Help us help you: attach a .love.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Wiki changes

Post by Inny »

Robin wrote:
Inny wrote:In the case of love.keyboard.isDown, there's only one meaning to the function, so it's probably okay to bunch it there (or list the other ways to use it as one section), but with other functions that can take a wide variety of parameter, please keep it separated out.
And doing it sometimes this way and sometimes that way is awfully inconsistent, let's not do that.
Right, right. Consistency is important. What I was saying is that the function( manditory [, optional] ) style isn't necessarily a problem, since it's how functions are listed in the Lua 5.1 manual.
For instance, table.sort (table [, comp]).
On the otherhand, what is this i don't even table.concat (table [, sep [, i [, j]]]).

Seeing as how the Wiki is our primary documentation for love's API, it's more important to get this right than pretty, so use the best judgment that money can buy.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Wiki changes

Post by qaisjp »

Inny wrote:what is this i don't even table.concat (table [, sep [, i [, j]]]).
Lol I see your point (took me a bit to figure it out) but this is it.
Downside is that it isn't very easy to code, normally Libraries/Frameworks/luathingys make you put all the arguments in between the start and the argument you want to put in.
Last edited by qaisjp on Wed Oct 24, 2012 7:19 pm, edited 1 time in total.
Lua is not an acronym.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Wiki changes

Post by Robin »

qaisjp wrote:Lol I see your point
I don't think you do.
Help us help you: attach a .love.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Wiki changes

Post by Inny »

Code: Select all

table.concat (table [, sep [, i [, j]]])
In case you didn't catch my intention, I was trying to say that the behavior of this function is highly varied based on the number of parameters given, and may be too confusing to explain in one go. The existing model in the wiki to break it down into 4 explanations is probably best to prevent confusion.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Wiki changes

Post by Ref »

I think something like:
function( WIKI [, ignorance] )
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests