Closed Validark closed 7 years ago
I've integrated this module into RoStrap, which is available here, meaning users can install it directly using the plugin. If F3X requests that it be removed, I will remove it.
Feedback? Suggestions?
This is great! Just got back from finishing a massive project over the past 2 weeks, will review these changes tomorrow 👍
One issue might be that comparing the metatables of potential attempt objects to Attempt
could make attempts generated by different instances of the library incompatible. If the goal is to avoid a false positive when _IsAttempt
happens to be in a returned, non-attempt table, perhaps we could move _IsAttempt
into the metatable itself where it is less likely to conflict?
What scenario are you envisioning where a user generates an Attempt
via Try
from the library, then calls the Attempt
methods on that Attempt
from a copy of the library or another version?
This just doesn't make sense to me, I don't see how that could be an issue. If people are using the prescribed method syntax, even if a user is for whatever stupid reason running 5 of the exact same library, there wouldn't be a conflict.
This is possible in cases where an arbitrary system might come prepackaged with the library as a dependency in order to generate and return attempts that are intended to be used by any other arbitrary script (which may use a separate copy of the library to handle that returned attempt)
Again, still impossible if a person uses method syntax
Merged these changes in 736af3be622eade2b0e7034d731f79c19f87fe08 for 2.0.0 🎉
Data
andTargetError
tables and instead only use one table andtable.remove
unpack
callsArgument
parameter withself
(more OOP style)Function
andCallback
Retry
have uniform logic after resetting attempt state__tostring
metamethod include an idipairs
andpairs
out for simple for loops (which are much faster)readme
link to top of filegetmetatable(self) == Attempt
table.remove
and doesn't require the creation of more than a single tableAnd, it's shorter :D
Note: Didn't change actual functionality