7GrandDadPGN / VapeV4ForRoblox

Vape V4 for Roblox, A project that has been in development for 4+ years.
Creative Commons Zero v1.0 Universal
198 stars 356 forks source link

Regarding LUAU style #59

Closed daymxn closed 2 years ago

daymxn commented 2 years ago

Hey folks! I'm new to the whole luau thing, so forgive my ignorance. I've been reading through your source here, and I had a few questions if you don't mind.

  1. Why are custom module file names random strings? Obfuscation?
  2. Why is the general style to keep large sections of logic in one file? For example, AnyGame.lua is over 4k lines. And it seems as though a very large portion of it could be modularized.
  3. Is it not common practice to implement EmmyLua style annotations? I see the Roblox LSP supports it, but I'm not familiar with how common it is.

Thank again :)

joeengo commented 2 years ago
  1. the custom module names are the place ids of the games/places they are loaded in.
  2. it probably could be modularized, but if you mean seperate files, that would just increase loading times.
  3. idk what EmmyLua is, maybe ur talking about classes? but classes in lua arent needed and just complicate things most of the time.
daymxn commented 2 years ago
  1. the custom module names are the place ids of the games/places they are loaded in.
  2. it probably could be modularized, but if you mean seperate files, that would just increase loading times.
  3. idk what EmmyLua is, maybe ur talking about classes? but classes in lua arent needed and just complicate things most of the time.
  1. For maintenance, wouldn't it make more sense to have a separate module script that defines those? Otherwise its hard to recognize what each script's usage is.
  2. In my personal experience, separate files barely increase loading time. My current script has some 30 separate files- and loads instantly. I think that's a false rumor.
  3. EmmyLua is like Javadoc for Lua, although its pretty shitty. I was more so asking about the documentation norm for roblox lua script. Although your comment about classes not being needed- I definitely disagree with. Maybe in a small script, but any large script like Vape, it could help a lot. Especially in catching bugs, and keeping things DRY.

My intention is not to insult you btw, I'm just curious about the general practice around lua- and why it's the way that it is. Coming from someone who works on very large repos like this: https://github.com/firebase/firebase-android-sdk , you can understand my confusion with the luau standards.

strawbberrys commented 2 years ago

because you can't contain scripts in modules for exploits that same you do normal scripts. you would have to send multiple http requests or download files and folders on your local machine to run them. you could also use a tool to combine scripts into one file, which would just end up being the same thing as this.

daymxn commented 2 years ago

because you can't contain scripts in modules for exploits that same you do normal scripts. you would have to send multiple http requests or download files and folders on your local machine to run them. you could also use a tool to combine scripts into one file, which would just end up being the same thing as this.

That's a good point, although I was under the assumption that was standard, as in you have a loader script that downloads the files before the actual execution. I'm pretty sure that's what's implemented in this rep for custom modules, and I think is totally valid. Especially since it'd be cached after the initial load.