Larry Wall wrote:
On Fri, Jan 23, 2009 at 08:01:14AM -0800, Dave Whipp wrote:
For example, I could conceive of a trait:

  ok foo, :broken<rakudo>

which might downgrade the error to a warning on rakudo, but not on other implementations.

On the surface that seems like a good idea, and pugs started out doing
things this way, but we discovered that it's a Terrible Mistake to
mix platform dependencies in with the notation of the actual test,.
..

All that being said, fudge is a preprocessor, and preprocessors are
a form of evil, so I'd certainly be open to the actual parser doing
the fudging during compilation if explicitly requested to do so.
My main concern is that the fudging directives not be intermixed with
the actual test, and that they not look like real code.


I can see that. So the alternative is to give things names and/or tags, so that we can attach parameters remotely. Such a mechanism should probably be more general than just tests, so I'll overload "is also" to impose additional traits:

  module MyTests {
   sub group1 {
     ok foo :name<test_foo>; ## Q - would a label be better?
   }
  }

  MyTests.group1.test_foo is also broken<rakudo>;

presumably this would have some form of wildcarding, or inheritance of the "broken" trait from outer scopes:

  MyTests is also broken<rakudo>;

Not sure if that could work.


Dave.

Reply via email to