generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Would you consider Lua to be Object Oriented?

Previous Thread :: Next Thread 
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
31 Mar 2013 10:36 AM
I'm asking this question because I'm not fully sure.

I've found pages on it in lua.org, and the ROBLOX wiki, but apparently to someone else Lua is NOT Object Oriented.

So here's my question: Is Lua Object Oriented, or not?

Also, if wanted, you can discuss Object Oriented Programming here.
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
31 Mar 2013 10:37 AM
I'm going to say yes, because even in normal Lua there isn't really much you can do without objects.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
31 Mar 2013 10:38 AM
No. Lua is procedural (I think?) but as the creators said, it has few but powerful constructs to allow many different paradigms.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
31 Mar 2013 10:45 AM
I'm at the Lua About page (http://www.lua.org/about.html) and it says this:

"For example, although Lua is not a pure object-oriented language, it does provide meta-mechanisms for implementing classes and inheritance." (Under "Lua is powerful (but simple)")
Report Abuse
NINJAKID09 is not online. NINJAKID09
Joined: 27 Aug 2009
Total Posts: 14392
31 Mar 2013 10:45 AM
Depends what the Lua's being used for, in ROBLOX's case - yes it would be because it's scripting that is orientated around objects.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
31 Mar 2013 10:54 AM
RBX.Lua certainly, your average Lua I would still say yes because it has much of the capability to be implemented as such.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
31 Mar 2013 10:58 AM
@MrChubbs
Happy 2333th post!

@thread
Yes and no. Lua has the potential to be OOP and un-OOP.

See: Roblox and LOVE
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
31 Mar 2013 10:59 AM
Lol, I didn't even notice. :D
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
31 Mar 2013 11:36 AM
yes it is

just because it doesnt have classes doesnt mean its not object oreinted

local object = {}

metatables and blah blah make up for no classes
Report Abuse
coplox is not online. coplox
Joined: 07 Jun 2008
Total Posts: 3252
31 Mar 2013 11:50 AM
I agree with SN0X
Report Abuse
lombardo2 is not online. lombardo2
Joined: 30 Nov 2008
Total Posts: 1604
31 Mar 2013 12:05 PM
Lua is object oriented, but it's not class based, it's prototype based. Like JavaScript
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
31 Mar 2013 12:58 PM
local object = {
property1 = "white"
property2 = "tall"
property3 = "skinny"
}

I do.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
01 Apr 2013 06:41 AM
Nice opinions, people.

I know Lua can be used to make games, but I wondered how as Lua (at the time I knew) wasn't Object Oriented.
Report Abuse
NINJAKID09 is not online. NINJAKID09
Joined: 27 Aug 2009
Total Posts: 14392
01 Apr 2013 07:38 AM
@UnAdmin You forgot your separators, that table would error.
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
01 Apr 2013 03:43 PM
Hmm. And after working all day with them :P
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image