On 2014-01-07 21:44, H. S. Teoh wrote:
If you have a good motivating use case in favor of this addition that
can be used in a DIP, I'd vote for it.
I'm usually not good at these arguments. I mean, it would be nice to
have but I don't have any strong arguments for it. It's just syntax sugar.
I reported this here some time ago:
http://d.puremagic.com/issues/show_bug.cgi?id=11501 (dup of
http://d.puremagic.com/issues/show_bug.cgi?id=8298)
and there's a pull request ready, not sure why it isn't being merged
On Sun, Jan 5, 2014 at 10:20 PM, dennis wrote:
> On Sunday, 5 January 2014 at
On Tuesday, 7 January 2014 at 23:12:09 UTC, Ali Çehreli wrote:
don't know the original problem but that program works without
any problem with the current dmd on github.
Works for me on dmd v2.064 (current stable) on Windows.
On 12/12/2013 08:33 PM, Nikhil Padmanabhan wrote:
Hi,
The following code dies with a segfault :
import std.stdio, std.parallelism, std.process;
void main() {
auto a=["hello","world","goodbye"];
foreach(s; parallel(a,1)) {
auto ls=executeShell("echo "~s);
writeln(ls.
On Tue, Jan 07, 2014 at 09:38:34PM +, Binarydepth wrote:
>
> >or ... for(count=1;count>0 && count<100 || count>999 &&
> >count<1 || etc...; count++ )
>
> That won't work. It's better separate foreach loops.
Y'know, this code snippet really reminds me of why Jackson Structured
Progra
On Tuesday, 7 January 2014 at 20:38:11 UTC, Craig Dillabaugh
wrote:
Saves a few lines of code, and looks cooler, it seems that the
trivial foreach loop version is very easy:
string[] array;
foreach (key, value; aa) {
array ~= key;
array ~= value;
}
Assuming the return value o
On 1/7/14, Craig Dillabaugh wrote:
> In other words while:
>
> auto range = aa.byKey.map!(a => chain(a.only, aa[a].only));
> string[] array = range.join;
>
> Saves a few lines of code, and looks cooler, it seems that the
> trivial foreach loop version is very easy:
>
> string[] array;
>
or ... for(count=1;count>0 && count<100 || count>999 &&
count<1 || etc...; count++ )
That won't work. It's better separate foreach loops.
On Tuesday, 7 January 2014 at 20:52:40 UTC, H. S. Teoh wrote:
On Tue, Jan 07, 2014 at 08:38:10PM +, Craig Dillabaugh
wrote:
[...]
As someone with little experience with functional programming,
I am
just curious - having browsed through the thread - if the
various
solutions proposed here wo
On Thursday, 28 November 2013 at 23:45:26 UTC, H. S. Teoh wrote:
On Fri, Nov 29, 2013 at 12:36:18AM +0100, Binarydepth wrote:
Hi guys I'm having some problems. Calculations are not working
as
expected and I get segmentation fault. I used the 2.059
version and
it runs after compilation on compi
On Tue, Jan 07, 2014 at 08:38:10PM +, Craig Dillabaugh wrote:
[...]
> As someone with little experience with functional programming, I am
> just curious - having browsed through the thread - if the various
> solutions proposed here would really be considered more 'idiomatic'
> D. Or if they wer
On Tue, Jan 07, 2014 at 09:18:48PM +0100, Jacob Carlborg wrote:
> On 2014-01-07 16:58, H. S. Teoh wrote:
>
> >Y'know, I've always wanted "trailing delegate syntax":
> >
> > func(x, y, z; p, q, r) {
> > // body
> > }
> >
> >gets translated into:
> >
> > func(p, q, r, (x, y,
On Friday, 3 January 2014 at 17:38:16 UTC, Gary Willoughby wrote:
Simplest way to create an array from an associative array which
its contains keys and values?
For example if i have an associative array like this:
["one":"1", "two":"2"]
What's the easiest way to create a dynamic array that lo
On 2014-01-07 16:58, H. S. Teoh wrote:
Y'know, I've always wanted "trailing delegate syntax":
func(x, y, z; p, q, r) {
// body
}
gets translated into:
func(p, q, r, (x, y, z) => /* body */);
Since we already have UFCS, which translates a leading fragme
Also, I cannot find any documentation on ddox arguments
(ddoxFilterArgs). Is this currently not available? I had to look
through the source code and vibe.d to figure them out.
Regards,
Kelet
Hello,
I'm working on a library, and I'm trying to write the
documentation with Sönke's ddox software[1]. As I understand, it
works with the Ddoc documentation format[2].
The first problem I came across is that documented unit tests
weren't being converted into examples like in [2]. I came t
On Tue, Jan 07, 2014 at 03:35:43PM +0100, Jacob Carlborg wrote:
> On 2014-01-07 13:22, Philippe Sigaud wrote:
>
> >What about:
> >
> >void loop(void delegate() dg);
> >
> >loop({
> >...
> >
> >});
> >
> >Since any block is a void delegate().
>
> That's what we have now, and that doesn't look like
On Sunday, 5 January 2014 at 20:47:44 UTC, FreeSlave wrote:
But why does dmd use static linking by default? Is shared
version of phobos still experimental?
It is. It works pretty good in practice but Martin wanted to
improve provided utilities for library/symbol loading before
announcing it a
On Sunday, 5 January 2014 at 20:47:44 UTC, FreeSlave wrote:
import core.runtime;
int main()
{
Runtime.loadLibrary("does not care");
Runtime.unloadLibrary(null);
return 0;
}
When I try to compile this code with 'dmd main.d', I get errors
main.o: In function
`_D4core7runtime7Runtime
On 2014-01-07 13:22, Philippe Sigaud wrote:
What about:
void loop(void delegate() dg);
loop({
...
});
Since any block is a void delegate().
That's what we have now, and that doesn't look like a built-in statement ;)
--
/Jacob Carlborg
On Tue, Jan 7, 2014 at 8:50 AM, Jacob Carlborg wrote:
> I would like to have that in D as well, but with braces instead:
>
> void loop (void delegate () dg);
>
> loop {
> // endless loop
> }
What about:
void loop(void delegate() dg);
loop({
...
});
Since any block is a void delegate().
21 matches
Mail list logo