Show quoted text> Dude, I said from the beginning that setting lazy would "solve" it. If I just
> wanted to just make my code work I'd have left it at that.
But that is the whole point, if you leave it out then your accessor will *not* be
lazy and therefore will not exhibit the lazy behavior. We gave you a solution
(actually you had it all along) that works perfectly and allows for room to grow
even, but you decided you didn't want it, but wanted us to change core behavior
instead.
Show quoted text> Users shouldn't have to set magic flags or study the documentation to make
> things work sensibly. They shouldn't have to set a
> make_it_work_right_but_a_little_slower flag
Well to start with, lazy is not a "magic flag", it is a flag that indicates the
generator accessor should behave in a certain way which is pretty clearly explained
in the docs and is really not all that hard to understand. It is one of those
features that straddles the line and will do easy things easily (like your use
case) and allows much more complex behaviors such as the Tree example in the
Cookbook (which prevents infinite recursion in a circular data structure).
As for users studying the documentation, I disagree, I think if you want to learn
how to use a powerful tool, you are going to need to read some docs. It is simply
impossible for a tool as powerful as Moose to be so intuitive to everyone that
close study of the documentation is not required at some point.
Show quoted text> (make_it_work_wrong_but_a_little_faster would be better).
I could not possibly disagree more with that statement, making it "work wrong"
but "a little faster" is not a compromise I am willing to take, I think my record
on this is clear, I prefer correctness over speed anyday. And as with the "accessors
should always be generated" discussion we had at YAPC, I would prefer that you get
what you ask for, rather then having to ask *not* to get something.
Also, your "right" and "wrong" are subjective and I disagree with your assessment,
in fact I see them as the inverse.
Show quoted text> If you have to put caveats and warnings in the docs to steer the users away
> from the obvious choice of action that's a red flag and a source of user errors.
I don't totally agree that it is "obvious" that default values will DWIM like you
seem to think they should. But I think it has been pretty well established already
that you and I disagree on what "DWIM" means so there is no need to belabor that.
Show quoted text> I also like to report when I fall into pits so that later when someone else
> reports it they don't get "well you're the only one to report it so its not a
> problem". Bugs reports are like cockroaches, for every that gets reported
> there's a hundred you don't. Ten times that for interface problems which are
> technically not "bugs" and can be an uphill climb to convince the devs there's
> even a problem.
Sure, and we took your report to heart and it spawned several discussions among
the cabal members, but in the end it was decided that lazy was a far superior
solution. To make what you wanted work properly would not only increase the
object construction and accessor overhead, but add complexity to a part of the
code which is already pretty complex. To solve this problem correctly would
require a partial laziness to be implemented within object construction which
would not only complicate the part of Class::MOP you patched, but also all the
constructor and accessor code generation in Class::MOP and Moose. The end decision
was that all this work, overhead and future maintanance was not worth it when
lazy already existed and does the job perfectly and, as I said before, allows
for room to grow.
Show quoted text> I made the effort to dig into Class::MOP and figure out what's going on.
And I appreciate that very much.
Show quoted text> I wrote my thinking out loud so maybe there could be a discussion or something.
Right, but unfortunately you did it in an inappropriate forum, one which you have
been asked repeatedly to not use in such a way. Discussion is for the mailing list
or IRC where we can go over the details of the issue and get varied input from
people /other then those who get the emails from RT/. If after that it is decided that
it truely is a bug, then I am happy to have you put it into RT or re-open a
closed or rejected bug. This is pretty much said/implied in the Moose::Manual::Contributing
document as is the fact that we do not accept new features that are not first vetted
by a MooseX:: module (which I suggested you do with this).
Show quoted text> I submitted a simple patch which passes all tests and fixes a good chunk of
> the problem. I haven't been given a clear reason why it can't be applied as a
> partial solution.
Actually, I disagree that it fixes the problem, or even a decent chunk of it, in fact
I think that it creates more problems. Your patch solves your problem quite well, it does
not solve the slightly more complex case Dieter (HDP) and Jesse (DOY) mentioned. Your
partial solution would then require yet more caveats and workarounds to be added to the docs,
something you yourself have said is a bad thing.
Show quoted text> I didn't get an answer as to why lazy is not the default. If its for
> performance or just backwards compatibility, fine. Just say so.
Yes, it is exactly that ... and more. We have tried very hard to make sure (at runtime) you
only pay for what you use and making lazy the default would incur a penalty even on those who
didn't ask for it. But it is not just about performance penalty, I believe, as I said above,
that you should let the user decide and not make decisions for them. I find it very unintuitive
to have to ask to *not* have a feature.
Show quoted text> Until I know there's a good reason behind an awkward design choice I'll continue
> to pick at it.
Again, we disagree on what DWIM means and what constitutes an "awkward design choice"
so I don't expect to convince you.
Show quoted text> These are not personal help desk tickets. I found something hard to use, I
> want to make it easier for the next guy and a took a stab at patching it.
> That's what I do. That's what you're supposed to do.
Right, I don't disagree with that, I just think that RT is the wrong forum for *continuing*
such a discussion, as I have stated to you already in the past (RT #34039 and #34313) and in
my response to you in this ticket. Subscribe to the mailing list or visit us on #moose or even
#moose-dev to discuss this further and pled your case.
Show quoted text> Not all bugs have an error message.
And not everything *you* think is a bug is /actually/ a bug. In this case, it is your
opinion that Moose is doing the wrong thing, not an indisputable fact, and I flat out disagree
with you.
Honestly our fundemental disagreement reminds me of the whole debate over the RoR philosophy
of "convention over configuration". You are suggesting that Moose embrace "convention", while
I am much more firmly in the "configuration" camp. As I am sure you will agree, configuration
is the more flexible of the two, but at the cost of requiring explicitness from the user. While
convention brings more consistency and percieved simplicity, at the cost of reduced flexibility.
Moose is not like other CPAN libraries, it is a library with which to write other libraries with.
In essence Moose's problem domain is not unlike that of a programming language. And as we all
well know, programming languages are very subjective things, some people love Perl and find it
very intuitive (warts and all), others hate it with a strong passion. Moose has already clearly
exhibited this exact same ability to evoke strong emotions and opinions in others. In fact, I
have always said that Moose is not for everyone and that no one should ever feel compelled to use
it if they don't want.
So, anyway, in conclusion (cause this is getting long), please take these things to the mailing
list or IRC where they can get greater feedback and discussion, but do not be surprised when
you ask us to change core behavior that we don't insist you vet this behavior in a MooseX:: module
first. There is nothing worse then adding a feature only to find it has inheriant problems and
then being stuck in situation of having to maintain backwards compatibility for a mistake .
- Stevan