Added: 1 year ago
From: kllr101
Views: 3,337
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (19)

Sign In or Sign Up now to post a comment!
  • Why can't person be a function that returns the table rather than a table its self.

  • public getName()

    it should be

    public string getName()

  • @tallibba There really was no need for anything more complex than a basic table and functions for what was being demonstrated.

  • Comment removed

  • Comment removed

  • @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 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.

  • This was SSOOO helpful, thank you!

  • 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 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?

  • Comment removed

  • @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.

  • Comment removed

  • Uhhhh wut? XD

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more