On Friday, 20 November 2020 at 07:39:10 UTC, norm wrote:
I was reading some posts and this was presented as a snippet of
code and was immediately flagged as bad practice.
Eh, I wouldn't quite put it that way. If we're thinking of the
same thread, one person said he thought it was a bad idea.
I was reading some posts and this was presented as a snippet of
code and was immediately flagged as bad practice.
I get some people don't like it but occasionally I prefer this
syntax. It feels more declarative and fluent in style. Is there a
good technical reason why it is bad practice, e.g.
On Friday, 20 November 2020 at 03:06:37 UTC, WhatMeWorry wrote:
The "..when this option is enabled..." is exactly the behavior
I want, but how is it enabled? Is there an "all inclusive
pattern" that I'm missing.
dmd -i yourfile.d
that's the default it is describing when you don't specify any
The DMD forum mentions internal design. This is more of a
beginner usage question.
- from Compiler Switches
-
-I=directory
Look for imports also in directory
-i[=pattern ]
Enables "include imports" mode, where the compiler will
in
On Thursday, 19 November 2020 at 19:51:24 UTC, Vino wrote:
the moment we enable
parallelism, it is throwing an error on the SQL part (Fetch the
username/ password from the table for each account), as it
could not execute the SQL query in parallel for different
account.
I see no reason for a S
On Wednesday, 18 November 2020 at 21:33:58 UTC, Ali Çehreli wrote:
On 11/18/20 7:01 AM, Vino wrote:
>Request your help on how to call a function(listFile) from
another
> function(getFilelist) within the same class(GetDirlist),
below is an
> example code.
That code looks unnecessarily comple
On Thursday, 19 November 2020 at 14:34:38 UTC, Adam D. Ruppe
wrote:
On Thursday, 19 November 2020 at 00:20:50 UTC, Dibyendu
Majumdar wrote:
Okay thanks. Bad idea IMO.
That's kinda how I see C taking the address of various things
implicitly.
To be honest it seems irrelevant what C does.
On 11/19/20 6:12 AM, Steven Schveighoffer wrote:
On 11/18/20 6:06 PM, ag0aep6g wrote:
int opCmp(S other)
{
import std.typecons: tuple;
return tuple(this.tupleof).opCmp(tuple(other.tupleof));
}
Ah, excellent solution! I hadn't thought of that.
-Steve
That'
I will wait with this code.
WaitForSingleObject(threading, INFINITE);
On Thursday, 19 November 2020 at 14:34:38 UTC, Adam D. Ruppe
wrote:
On Thursday, 19 November 2020 at 00:20:50 UTC, Dibyendu
Majumdar wrote:
Okay thanks. Bad idea IMO.
That's kinda how I see C taking the address of various things
implicitly.
good example
On Thursday, 19 November 2020 at 15:51:09 UTC, Kagamin wrote:
The delegate is stored on the stack of the calling thread, the
created thread loads it from there, but the calling thread
doesn't wait for that and clobbers the stack right away. If you
were lucky your code would crash.
The thread
The delegate is stored on the stack of the calling thread, the
created thread loads it from there, but the calling thread
doesn't wait for that and clobbers the stack right away. If you
were lucky your code would crash.
On Thursday, 19 November 2020 at 00:20:50 UTC, Dibyendu Majumdar
wrote:
Okay thanks. Bad idea IMO.
That's kinda how I see C taking the address of various things
implicitly.
On 11/18/20 6:06 PM, ag0aep6g wrote:
On Wednesday, 18 November 2020 at 22:29:17 UTC, Steven Schveighoffer wrote:
How do I do something really simple for opCmp? I tried this it didn't
work:
return this == other ? 0 :
this.tupleof < other.tupleof ? -1 : 1;
std.typecons.Tuple has opCmp. So
On 11/18/20 6:02 PM, Paul Backus wrote:
On Wednesday, 18 November 2020 at 22:29:17 UTC, Steven Schveighoffer wrote:
I have a struct like this:
struct S
{
int x;
int y;
}
and I want a default comparison. The problem is, that comparison
doesn't have a default, and requires I implement opC
Solved replacing this line:
CreateThread(null, 0, &_fun, &fun, 0, null);
to this code:
task!({CreateThread(null, 0, &_fun, &fun, 0,
null);}).executeInNewThread();
On Thursday, 19 November 2020 at 00:07:12 UTC, Dibyendu Majumdar
wrote:
I have simple test program:
import core.stdc.stdio : printf;
void test() {
int* a;
printf("a == null %d\n", a == null);
}
int function() fp = test;
extern (C) void main() {
fp();
}
Why do I get:
\d\dmd-2.092
On Thursday, 19 November 2020 at 09:23:25 UTC, Jacob Carlborg
wrote:
Yes, calling `writeln` like that is a bad idea. That was a bad
example.
But the actual reason is, this is how D implements properties
[1]. Any function that doesn't take an argument can be called
without parentheses. Any fun
On Thursday, 19 November 2020 at 01:42:16 UTC, Mike Parker wrote:
On Thursday, 19 November 2020 at 00:20:50 UTC, Dibyendu
Majumdar wrote:
On Thursday, 19 November 2020 at 00:18:54 UTC, rikki
cattermole wrote:
You don't need the brackets to call a function (and with a
little help from UFCS):
On Thursday, 19 November 2020 at 00:20:50 UTC, Dibyendu Majumdar
wrote:
On Thursday, 19 November 2020 at 00:18:54 UTC, rikki cattermole
You don't need the brackets to call a function (and with a
little help from UFCS):
void main() {
import std.stdio;
"Hello!".writeln
On Wednesday, 18 November 2020 at 19:25:06 UTC, Vino wrote:
The above code is a sample code, but the logic is same,
correct me if my understanding is wrong, in the above code
"obj" is a an object for the class GetDirlist, so we are
accessing the class member using "obj.listFile(st)" , so why
On Thursday, 19 November 2020 at 07:46:20 UTC, Bastiaan Veelo
wrote:
On Wednesday, 18 November 2020 at 10:50:12 UTC, frame wrote:
I found the "bug". It was caused by a debug {} statement
within a struct method. I assume that the debug symbol is just
incompatible called from the DLL context.
W
22 matches
Mail list logo