Re: Last - but not least! - two DConf talks

2015-07-16 Thread via Digitalmars-d-announce

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...


Re: Voting for std.experimental.allocator

2015-07-16 Thread Uranuz via Digitalmars-d-announce

On Thursday, 16 July 2015 at 10:02:17 UTC, Dicebot wrote:

On Wednesday, 8 July 2015 at 11:33:03 UTC, Dicebot wrote:

Voting ends in 2 weeks, on July 22.


~1 week remains


Yes. It's time to have this functionality in standart library.


Re: Voting for std.experimental.allocator

2015-07-16 Thread Dicebot via Digitalmars-d-announce

On Wednesday, 8 July 2015 at 11:33:03 UTC, Dicebot wrote:

Voting ends in 2 weeks, on July 22.


~1 week remains



Re: Last - but not least! - two DConf talks

2015-07-16 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-07-16 10:26, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net 
wrote:



Do mixin templates work on module level? They can even have an identifier.


Yes. But a mixin template seems only be able to contain declarations. 
How did you plan to use it?



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...


Hmm, right. I have simple implementation of this. With you're example I 
get this error message:


function main.foo () is not callable using argument types (void 
function() @safe)


--
/Jacob Carlborg


Re: Last - but not least! - two DConf talks

2015-07-16 Thread Atila Neves via Digitalmars-d-announce

On Thursday, 16 July 2015 at 08:26:58 UTC, Marc Schütz wrote:
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.


Yes. But it doesn't make it pretty to use:

mixin When!(`...`, { });

Atila



Re: Last - but not least! - two DConf talks

2015-07-16 Thread Atila Neves via Digitalmars-d-announce

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.


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.


I tried out something like this to see how I'd like it before the 
talk, and I didn't. I mentioned it but I should've drawn more 
attention to it, it'd look like this:


@When!(`...`, { ... }) {}

The empty block needed at the end was just too ugly.

Atila



Re: FancyPars

2015-07-16 Thread Stefan Koch via Digitalmars-d-announce

On Monday, 6 July 2015 at 09:22:51 UTC, Per Nordlöw wrote:

On Thursday, 2 July 2015 at 14:25:09 UTC, Stefan Koch wrote:

Small announcement.

I uploaded my parser-generator onto github.
It is work in progress and unfinished!


How does its design and use differ from Pegged?


The use does not really differ.
The Design however is very diffrent.
instead of templates it generates CTFEable Functions.