On Apr 8, 2005, at 9:36 AM, Geoffrey Young wrote:
as someone familiar with T::M and not javascript, were I to try to use this
it's an additional barrier to call it "Test::More in JavaScript" but not
provide _the exact same functions_ as Test::More. now before everyone
starts slamming this let me explain...
Is this about the studlyCaps function names? :-)
as we shaped the php T::M port we started hitting a few things that were
perlish but not phpish. isa_ok() is a good example - isa() is a perl method
but php calls it something else. so, what we plan on doing (or did,
depending on the function) is implementing isa_ok() for the perl folks and
aliasing it to foo_ok() (I forget what) for the php folks. I think we
carried over use_ok() even though php doesn't distinguish between use and
require in the perl sense, for example.
Yes, this is why I wrote eqAssoc() and then added an alias named eqHash(). Although the next release won't have these functions, on Schwern's advice. As for isaOk(), JavaScript has no equivalent--the implementation is a big hack. So I think "isa" works as well as anything else.
I guess what I'm trying to say is that, really, the target audience for
these ports is primarily people who are already Test::More savvy. so,
taking away eq_array() or calling something isDeeply() just makes my life as
a perl-first developer more difficult. ok, marginally so, but still...
I think that isDeeply() works across both disciplines. The studly caps are there to make the JS folks comfortable. People already familiar with T::M will adapt fairly easily. After all, if you're serious about writing JavaScript, it's a benefit to you to start thinking in JavaScript.
the secondary audience are folks who are not Test::More savvy but who
program in $language. for them, providing functions with names like
isDeeply() is more idiomatic, so it's a good idea to offer them too - we
should make them as comfortable as possible so they adopt our awesome tools.
anwyay, just a few random thoughts. I don't ever plan on using javascript
so it really doesn't apply to me anyway :)
I guess I missed the point, then. :-)
oh, and david... you really are crazy ;)
Yeah, yeah, whatever!
Cheers,
David