@tallibba Well yes, but again, this was only to show simple ways to be able to get a form of object-orientated programming in Lua. It wasn't really to show full classes or inheritance, otherwise I would've used Metatables to do it.
I've found most of the time, This method will usually be fine for a simplistic "class" setup.
But you're free to disagree and stick with Metatables for them.
@ImKalleR A more "in-depth" tutorial could mean anything, I was just asking if he wanted a more specific use or attribute of Objects and OOP to be covered. For all I know he might want to know how to do inheritance or other ways of instancing, where I might babble on about say, abstraction in another tutorial.
I can do a simple one that starts to cover basic principles of OOP in Lua (such as here) but past here it becomes a very wide topic that I couldn't possibly cover in 1 video.
@kllr101 well, what I know about OOP it can be covered in just 3 videos, but then i meant in-depth i didnt mean in-depth like in the books, i meant like for being youtube, cause we all know that if you want a real professional in-depth explenation you need to buy a course or study some books (not just one of-course) btw if you make another tutorial plz record youre self talking AND have a text tutorial in the description couse its better. And i am sorry about my language im a n00b...
@ImKalleR Well that's just that, I didn't know what you (or MegaGrance) meant by "in-depth", after all, this is YouTube. I'm not sure whether I'll make another programming tutorial, but if I do, I'll take what you suggested into account (using voice over and putting explanations in the description)
@kllr101 Ok, well, I suppose the video was for people who learning Lua, and since Lua is an "easy" language its probebly the "watchers"(the people who watch the video) first programming language and that means they cant tell what they want in the next tutorial. So its up to the "teacher". BTW its good you made the video :D, there arent many Lua tutorials on YouTube.
Why can't person be a function that returns the table rather than a table its self.
DJRyan8 4 days ago
public getName()
it should be
public string getName()
MrOMGWTFxCorp 2 weeks ago
This has been flagged as spam show
You really should be using metatables.
tallibba 6 months ago
@tallibba There really was no need for anything more complex than a basic table and functions for what was being demonstrated.
kllr101 5 months ago
Comment removed
tallibba 5 months ago
Comment removed
tallibba 5 months ago
@kllr101 Without metatables you are just creating a new table.
You can't use inheritance.
You are overheading(Hard).
This is not a class this is just a table.
lua-users. org/wiki/SimpleLuaClasses
tallibba 5 months ago
@tallibba Well yes, but again, this was only to show simple ways to be able to get a form of object-orientated programming in Lua. It wasn't really to show full classes or inheritance, otherwise I would've used Metatables to do it.
I've found most of the time, This method will usually be fine for a simplistic "class" setup.
But you're free to disagree and stick with Metatables for them.
kllr101 5 months ago
This has been flagged as spam show
This was SSOOO helpful, thank you!
earth2george 8 months ago
This was SSOOO helpful, thank you!
earth2george 8 months ago
Thanks for that!
Can you make video with more complex classes and using more instances of it?
Which parts of class functions are global and wich one only local?
MegaGrance 11 months ago
@MegaGrance Someone found this video helpful! wow.
I may make another tutorial on lua classes, but what parts would you like to be covered in it?
kllr101 11 months ago
Comment removed
ImKalleR 2 months ago
@ImKalleR A more "in-depth" tutorial could mean anything, I was just asking if he wanted a more specific use or attribute of Objects and OOP to be covered. For all I know he might want to know how to do inheritance or other ways of instancing, where I might babble on about say, abstraction in another tutorial.
I can do a simple one that starts to cover basic principles of OOP in Lua (such as here) but past here it becomes a very wide topic that I couldn't possibly cover in 1 video.
kllr101 2 months ago
@kllr101 well, what I know about OOP it can be covered in just 3 videos, but then i meant in-depth i didnt mean in-depth like in the books, i meant like for being youtube, cause we all know that if you want a real professional in-depth explenation you need to buy a course or study some books (not just one of-course) btw if you make another tutorial plz record youre self talking AND have a text tutorial in the description couse its better. And i am sorry about my language im a n00b...
ImKalleR 2 months ago
@ImKalleR Well that's just that, I didn't know what you (or MegaGrance) meant by "in-depth", after all, this is YouTube. I'm not sure whether I'll make another programming tutorial, but if I do, I'll take what you suggested into account (using voice over and putting explanations in the description)
kllr101 2 months ago
@kllr101 Ok, well, I suppose the video was for people who learning Lua, and since Lua is an "easy" language its probebly the "watchers"(the people who watch the video) first programming language and that means they cant tell what they want in the next tutorial. So its up to the "teacher". BTW its good you made the video :D, there arent many Lua tutorials on YouTube.
ImKalleR 2 months ago
Comment removed
MegaGrance 11 months ago
Uhhhh wut? XD
RaedwaldR 1 year ago