James Clark

Results 508 comments of James Clark

We can deal with most of this by making errors work consistently with new included record parameter feature #578. But the fact that the `cause` argument is optional complicates this.

In the spec currently, whether an error constructor can use a named argument to specify a field of the error detail record depends on whether the error type has a...

One obvious approach is to allow an error constructor to use `..m` where m is a mapping, as with function calls (see #455). But this is not so simple. Consider...

Another approach (suggested by @hasithaa in #355) is to allow string literals as the name of arguments, so you would say: ``` error("msg", x = 1, "z" = 2) ```...

My preference is to push this to post-Swan Lake.

I find the terminology of "mock object" and "mock function" not quite right. A "mock function" is not doing the same thing to a function that a "mock object" is...

Another way to approach this is that we have: - mock functions, and - mock classes Mocking a function means you provide a mock definition for a function exported by...

For a mock function definition, can we simply do something like this? ``` // Provide a function that can be used instead of m:foo. @test:mockFunction { replaces: m:foo } function...

I can also envisage a langlib function for dynamic object creation. Something like: ``` public function dynamicNew(record {} r, typedesc t = ) returns t|error; ``` This would create an...