#need some guidance on syntax/logic
1 messages · Page 1 of 1 (latest)
<@&987246841693360200> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
@dusky fossil You can make them public or package-private methods
if you wanted to do something like "must have admin auth to call method, enforced by type system"
then thats doable, but not exactly useful
but if you want to do it then like
but by making them public wont make them like vulnerable in a sense? although its just a simple game but
still a bad practice i guess?
well, your mechanisms here are public/private/package-private
and the module system
so you can prevent code in other packages from accessing code in a package
or you can group your packages into a module and make sure other modules can't access some of the packages
other kinds of auth are a layer on top of that, but they aren't code-level security
still a bad practice i guess
Eh? your code is not more than 1000 lines
and this is something large codebases can get away without doing
proper modularization isn't exactly for this
i see, will try to do so