Hey Guys
I was searching the forums for an answer to this one today but couldn't find much on the topic.
I've selected 30log when I first started my initial "test project" with which to learn LÖVE and dive deeper into Lua. I really like it so far, but I'll admit I'm just now starting to dive into OOP.
When reading the forums, I've noticed a lot of users tend to suggest Middleclass as their goto class library. I can't help but be curious if I'm missing out on some functionality that makes it more prominent here on the forums???
What's the big difference or draw?
When I was looking at the docs on github for Middleclass, I didn't really see how you declare specific class variables before the object instance is initialized... If that makes sense.
Thanks for any illumination!
Class Library Differences - 30log vs Middleclass
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Class Library Differences - 30log vs Middleclass
I LÖVE BACON.
Re: Class Library Differences - 30log vs Middleclass
middleclass is the general recommendation as it has about the right level of functionality that most people need from a class-inheritance system. Mixins in particular are one of the stronger features.
30log also has a lot of good functionality, and there's no reason to bash on it.
30log also has a lot of good functionality, and there's no reason to bash on it.
Re: Class Library Differences - 30log vs Middleclass
30log is actually kind of crap in that Inheritance is broken. I highly recommend either using middleclass or hump.class.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Class Library Differences - 30log vs Middleclass
Enlighten me, please.Karai17 wrote:30log is actually kind of crap in that Inheritance is broken.
I'd love examples.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Class Library Differences - 30log vs Middleclass
You might be thinking of the similarly named 32log, which I've skewered like something that gets skewered a lot, three and a half years ago.Karai17 wrote:30log is actually kind of crap in that Inheritance is broken.
Not that 30log is free of faults. It uses a deep_copy implementation that is in some ways a deep copy implementation, some of the time. It handles non-tree datastructures much the same way SLib does. Keys are never copied. If you pass in a third argument, it becomes a shallow copy that only brings in values of a specific type, used to make sure mixins only mix in functions. Yep, deep_copy is one crazy function.
I didn't really want to take a close look, you can probably find much more wrong with it if you were willing to look at the code for more than five minutes
Help us help you: attach a .love.
Re: Class Library Differences - 30log vs Middleclass
I didn't really want to start a war here, I just wanted to know why people preferred one over the other... but if it gets super technical, then it may be over my head anyway.
I LÖVE BACON.
Re: Class Library Differences - 30log vs Middleclass
Nah, there is no war here. the 30/32log libs annoy me because their main goal is to use the least amount of lines to prove a point, instead of provide the most amount of function to provide a service. Middleclass and hump.class are both top notch libraries (hump also has lots of other terrific libs) and I recommend using either.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Class Library Differences - 30log vs Middleclass
I like Moonscript's class implementation.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Class Library Differences - 30log vs Middleclass
Thanks for the link. That looks a bit too complex for my skill level. I'm still wrapping my brain around the basics.Roland_Yonaba wrote:Which is described here, by the way.szensk wrote: I like Moonscript's class implementation.
I LÖVE BACON.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests