Hi,
shouldn't the unix time functions be in std.datetime.Date and
std.datetime.DateTime instead of std.datetime.SysTime?
The documentation states:
- "std.datetime.systime for a point in time with a timezone."
- "std.datetime.date for points in time without timezones."
Unix epoch is 00:00:00 U
On Wednesday, 14 April 2021 at 20:38:16 UTC, Mario wrote:
I wanted to find out if it is possible to create classes
dynamically.
out of curiosity: Why you would like to do this? I cannot think
of a use case for this - this is why i ask.
Hi,
is this how it supposed to be? (https://run.dlang.io/is/7B4irm)
---
string a = null;
string t = "";
assert( ! a );
assert( t );
assert( t == a );
---
I have not expected assert(t == a) to be true - i would like to
know the argument for why this is correct when at the same time
assert(!a)
Hi,
lets say i want to create a function that returns multiple values
- e.g. Tuple!(string,string).
Why/when i should prefer Tuple as a return type over returning a
struct (or even string[2] in this case)?
Thank you
On Friday, 20 November 2020 at 10:03:18 UTC, Daniel Kozak wrote:
I remember days when I liked UFCS too . Unfortunately it is
not so awesome when you use it with IDE.
And I would like to add: if you use in a bigger team. It's
annoying when every dev have a own taste.. And together with
option
On Sunday, 15 November 2020 at 00:29:41 UTC, H. S. Teoh wrote:
if you don't like the semantics, don't use it; always allocate
the field in the class ctor instead.
Hi, i neither like it nor dislike it - it just caught me by
surprise because i was under the impression that if i create a
new ins
On Saturday, 14 November 2020 at 23:30:58 UTC, Adam D. Ruppe
wrote:
On Saturday, 14 November 2020 at 23:20:55 UTC, Martin wrote:
Is this intentional?
[...]
alright, thank you! :)
Hi, i do no know if this is intended - but imo this is weird:
https://run.dlang.io/is/eBje3A
I expected that `c.a.str == ""` (just like `c.str` is). But
instead `c.a.str` keeps the value of `b.a.str`.
Is this intentional? IMO this feels not consistent and its weird
when a reference leaks into
On Friday, 2 October 2020 at 09:46:09 UTC, Denis Feklushkin wrote:
Because standard implementation worse?
What do you mean with "worse"?
In my experience std.json is a very thin implementation of the
JSON spec - without/very low "magic". IMO this is what one wants
in a std lib. Its a good sta
Hi,
i would like to create a function which takes the first parameter
as a reference to a struct - but assure the calle that the
reference is read-only. Can this be done?
If i am not mistaken, then the "in" Parameter Storage Class is
what i want(?). But the documentation states that this feat
On Sunday, 9 August 2020 at 19:04:07 UTC, Marc wrote:
I don't know much more about D than creating a 'hello world'
exe file with the DMD Compiler
but I'm interested in using the eBay/tsv-utils binaries.
Unfortunately, the author didn't create any MS Windows binaries:
https://github.com/eBay/tsv-
On Sunday, 9 August 2020 at 15:56:31 UTC, Ali Çehreli wrote:
module deneme;
import std.stdio;
interface I {
void methodName();
}
...
I getClassById(uint id)
{
if (id == 0) {
return cast(A)Object.factory("deneme.A");
} else if(id == 1) {
return cast(B)Object.factory("de
ok, thanks you very much for the information.
Thank you for the answer
On Saturday, 4 November 2017 at 01:35:41 UTC, Adam D. Ruppe wrote:
Why are these ref?
Just taking ref away from both of those will likely fix your
problems.
because without it i get the error "Program exited with code -11"
The thing is, somwhere deeper in `setRelatio
I have a interface
`interface Node {...}`
and some classes implementing Node:
```
class Text : Node {...}
class Element : Node {...}
```
and a function like this:
`public void setRelation(ref Node parent , ref Node child) {...}`
if i do this it works:
```
Node root = new Element("root");
Node te
Hi,
i have a coulpe of different machines with MySQL Servers running
on it.
Now, i want to execute queries for all Databases at the same time
and collect the Result to process it.
I am new to the parallelism - so maybe i understand something
totaly wrong.
What i tring is something like this
On Sunday, 11 January 2015 at 11:52:42 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 11 Jan 2015 11:41:08 +
Martin via Digitalmars-d-learn
wrote:
Is there a way to get Tuple (and Typedef) from the std.typecons
module to generate a new type that is unique on every
instantiation
Is there a way to get Tuple (and Typedef) from the std.typecons
module to generate a new type that is unique on every
instantiation? What I mean is:
alias T1 = Tuple!(int, int);
alias T2 = Tuple!(int, int);
writeln(__traits(isSame, T1, T2)); // prints true
When using Typedef, the types are stil
When I use the spawnProcess function in std.process, the command
line arguments that I provide to the function seem to get
"quoted". Is there a way to tell the spawnProcess function that I
want the command line arguments to be non-quoted?
Example:
spawnProcess(["SomePath\\Test.exe"], ["-silent
19 matches
Mail list logo