Last - but not least! - two DConf talks
via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Jul 16 01:26:57 PDT 2015
On Wednesday, 15 July 2015 at 19:28:13 UTC, Jacob Carlborg wrote:
> On 2015-07-13 09:12, Atila Neves wrote:
>
>> https://www.reddit.com/r/programming/comments/3d3ooa/behaviourdriven_development_with_d_and_cucumber/
>>
>>
>> Also on HN, but as usual can't post the link.
>
> The comment about not having to name the steps. One way to do
> that could be something like this:
>
> step("foo bar", {
> // step implementation
> });
>
> There are two problems with that:
>
> 1. D doesn't support module level code like this. Which could
> be solved by either using a unit test block, a module
> constructor or some other function the framework knows about to
> call.
Do mixin templates work on module level? They can even have an
identifier.
>
> 2. That syntax is not as nice as in Ruby. It would be really
> nice if the following could be supported:
>
> step("foo bar") {
> // step implementation
> }
>
> A trailing delegate syntax, where the delegate is passed after
> the regular argument list.
Unfortunately there are syntactical ambiguities:
step("foo bar") {
}
.foo();
Is that a call chain, or two statements, with the second one
calling a function in the root scope? And I think there are other
similar cases...
More information about the Digitalmars-d-announce
mailing list