## maybe im just nit picking...

General discussion about LÖVE, Lua, game development, puns, and unicorns.
hairy puppy
Prole
Posts: 29
Joined: Tue Apr 22, 2014 3:34 pm

### maybe im just nit picking...

hello all,

enjoying LOVE like the 6 year old me enjoying disneyland.

though i do have a question or two regarding the syntax of LOVE, maybe even lua, but more on LOVE right now.
since it is mainly dealt with camel case [whereTheTextLooksLikeThis]. then why doesnt things like love.keypressed, or even love.keyreleased have them, like love.keyPressed and love.keyReleased. there are others, but these stuck out because ive been using them just now.
i may be nit picking here, but those keyboard functions have say .setKeyRepeat and so forth.

i guess im just looking at this as keeping things consistent. but just wanted to ask none-the-less. i guess coming from an arduino/c/c++ kind of call, then im just used to those things.
lewis lepton
------
http://smokingbunny.net

slime
Solid Snayke
Posts: 2887
Joined: Mon Aug 23, 2010 6:45 am
Contact:

### Re: maybe im just nit picking...

hairy puppy
Prole
Posts: 29
Joined: Tue Apr 22, 2014 3:34 pm

### Re: maybe im just nit picking...

thanks for that. i chimed in my annoying 2 cents too it
lewis lepton
------
http://smokingbunny.net

OttoRobba
Party member
Posts: 104
Joined: Mon Jan 06, 2014 5:02 am
Location: Sao Paulo, Brazil

### Re: maybe im just nit picking...

Just to point out that some modules will abide by a lowercase naming convention due to how Lua's core functions are written (and this might be why LÖVE's callbacks are as they are now).

dofile
setmetable
math.randomseed
debug.traceback
...
and so on.

PS: Welcome to LÖVE

hairy puppy
Prole
Posts: 29
Joined: Tue Apr 22, 2014 3:34 pm

### Re: maybe im just nit picking...

aye, well the functions for onFocus, keyPressed etc have been the centre of attention. but thanks for letting me know. good to keep in the loop
lewis lepton
------
http://smokingbunny.net

HugoBDesigner
Party member
Posts: 403
Joined: Mon Feb 24, 2014 6:54 pm
Location: Above the Pocket Dimension
Contact:

### Re: maybe im just nit picking...

You can always have this on the top of main.lua or in the beggining of love.load:

Code: Select all

love.keyPressed = love.keypressed
love.keyReleased = love.keyreleased
love.mousePressed = love.mousepressed
love.mouseReleased = love.mousereleased
--Any other code. You got my point

But yeah, I think I'd prefer uppercase too (even though it'd break 100% of LÖVE games).
HugoBDesigner - my Blog

Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

### Re: maybe im just nit picking...

I'd go one step further and ask why the callbacks aren't subscriptions

Code: Select all

love.on_update(function(dt)
inny.writes.too.much:javascript()
end)


OttoRobba
Party member
Posts: 104
Joined: Mon Jan 06, 2014 5:02 am
Location: Sao Paulo, Brazil

### Re: maybe im just nit picking...

Inny wrote:I'd go one step further and ask why the callbacks aren't subscriptions

Code: Select all

love.on_update(function(dt)
inny.writes.too.much:javascript()
end)


slime
Solid Snayke
Posts: 2887
Joined: Mon Aug 23, 2010 6:45 am
Contact:

### Re: maybe im just nit picking...

Inny wrote:I'd go one step further and ask why the callbacks aren't subscriptions

Code: Select all

love.on_update(function(dt)
inny.writes.too.much:javascript()
end)

In my eyes, that code snippet is the perfect illustration for why LÖVE will not do that.

Ragzouken
Citizen
Posts: 84
Joined: Fri Aug 10, 2012 7:59 am
Contact:

### Re: maybe im just nit picking...

all i ask is please avoid putting "on" in front of everything D:

### Who is online

Users browsing this forum: No registered users and 10 guests