On Tuesday, 14 August 2018 at 02:53:01 UTC, Cecil Ward wrote:
On Sunday, 12 August 2018 at 12:27:59 UTC, Alex wrote:
On Saturday, 11 August 2018 at 05:17:51 UTC, Cecil Ward wrote:
T myfunc(T)( T x, uint mask )
if ( mask == 3 )
{
return fast_func( x, mask );
}
[...]
Is it the volc
On Sunday, 12 August 2018 at 12:27:59 UTC, Alex wrote:
On Saturday, 11 August 2018 at 05:17:51 UTC, Cecil Ward wrote:
T myfunc(T)( T x, uint mask )
if ( mask == 3 )
{
return fast_func( x, mask );
}
[...]
Is it the volcano pattern you are looking for?
https://p0nce.github.io/d-idio
On Monday, August 13, 2018 6:14:56 AM MDT Andrey via Digitalmars-d-learn
wrote:
> On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole wrote:
> > Unsupported. AA's don't go between CT and RT. You must use a
> > module constructor to initialize it.
>
> Will be supported in future?
Maybe, bu
On Monday, August 13, 2018 6:42:02 PM MDT zeus via Digitalmars-d-learn
wrote:
> On Tuesday, 14 August 2018 at 00:24:53 UTC, Jonathan M Davis
>
> wrote:
> > On Monday, August 13, 2018 6:06:22 PM MDT zeus via
> >
> > Digitalmars-d-learn wrote:
> >> [...]
> >
> > Why are you casting the string to a c
On Tuesday, 14 August 2018 at 00:24:53 UTC, Jonathan M Davis
wrote:
On Monday, August 13, 2018 6:06:22 PM MDT zeus via
Digitalmars-d-learn wrote:
[...]
Why are you casting the string to a char*? That's just going to
make writeln print out the pointer value. If you want to print
out the value
On Monday, August 13, 2018 6:24:53 PM MDT Jonathan M Davis via Digitalmars-
d-learn wrote:
> On Monday, August 13, 2018 6:06:22 PM MDT zeus via Digitalmars-d-learn
>
> wrote:
> > i have the following code in d and i get as result 4D77EB, also i
> > have the following code in c++ wich give me as res
On Monday, August 13, 2018 6:06:22 PM MDT zeus via Digitalmars-d-learn
wrote:
> i have the following code in d and i get as result 4D77EB, also i
> have the following code in c++ wich give me as results
> 0xABCDEF123abcdef12345678909832190 how i can get in d
> 0xABCDEF123abcdef12345678
i have the following code in d and i get as result 4D77EB, also i
have the following code in c++ wich give me as results
0xABCDEF123abcdef12345678909832190 how i can get in d
0xABCDEF123abcdef12345678909832190 instead of 4D77EB
// D
void test(string test){
cha
On 2018-08-12 19:29, Eric wrote:
I thought it would work the same way as an interface (which must be
implemented by the direct sub class, otherwise compile error).
But apparently it's possible to implement an abstract function anywhere
in the class hierarchy. That makes it, in this case, impossi
On Monday, 13 August 2018 at 13:21:45 UTC, Andrey wrote:
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole
wrote:
You must use a module constructor to initialize it.
Tried this:
static this()
{
Test.DESCRIPTION = [Test.Type.One: "One!", Test.Type.Two:
"It's Two...", Test.Type.Th
On Monday, 13 August 2018 at 13:21:45 UTC, Andrey wrote:
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole
wrote:
You must use a module constructor to initialize it.
Tried this:
static this()
{
Test.DESCRIPTION = [Test.Type.One: "One!", Test.Type.Two:
"It's Two...", Test.Type.Th
On Monday, 13 August 2018 at 14:16:47 UTC, Mike Parker wrote:
On Monday, 13 August 2018 at 13:09:24 UTC, Andrey wrote:
On Monday, 13 August 2018 at 13:05:28 UTC, evilrat wrote:
however the best option is simply avoid naming anything with
same name as module.
Hmm, I thought that name of class
On Monday, 13 August 2018 at 13:09:24 UTC, Andrey wrote:
On Monday, 13 August 2018 at 13:05:28 UTC, evilrat wrote:
however the best option is simply avoid naming anything with
same name as module.
Hmm, I thought that name of class should match name of file...
And how to name a file that conta
On Monday, 13 August 2018 at 13:09:24 UTC, Andrey wrote:
On Monday, 13 August 2018 at 13:05:28 UTC, evilrat wrote:
however the best option is simply avoid naming anything with
same name as module.
Hmm, I thought that name of class should match name of file...
And how to name a file that conta
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole wrote:
You must use a module constructor to initialize it.
Tried this:
static this()
{
Test.DESCRIPTION = [Test.Type.One: "One!", Test.Type.Two:
"It's Two...", Test.Type.Three: "And... Three!"];
}
struct Test
{
// ...
}
I h
On Monday, 13 August 2018 at 04:23:49 UTC, James Blachly wrote:
On Thursday, 14 June 2018 at 00:42:25 UTC, James Blachly wrote:
...
I assume the (apparent) lack of parity between ctor and dtor
is because the "default postblit" (which I figured out for a
struct means an empty `this(this)` ctor)
On Monday, 13 August 2018 at 13:05:28 UTC, evilrat wrote:
however the best option is simply avoid naming anything with
same name as module.
Hmm, I thought that name of class should match name of file...
And how to name a file that contains only one class/struct? Like
in my case. What usually
On Monday, 13 August 2018 at 12:44:44 UTC, evilrat wrote:
Another option to save up on typing is renamed imports
import mc = MyClass;
mc.MyClass.parse(...)
this also should work
import mc = MyClass;
alias MyClass = mc.MyClass; // make synonym
// now it is just MyClass
MyClas
On Monday, 13 August 2018 at 12:34:25 UTC, Andrey wrote:
Hello,
This is my test project:
source/app.d
source/MyClass.d
app.d:
import std.stdio;
import MyClass;
void main(string[] args)
{
MyClass.MyClass.parse(args); // I want just
MyClass.p
Hello,
This is my test project:
source/app.d
source/MyClass.d
app.d:
import std.stdio;
import MyClass;
void main(string[] args)
{
MyClass.MyClass.parse(args); // I want just
MyClass.parse(args);
}
---
On Monday, 13 August 2018 at 11:53:06 UTC, rikki cattermole wrote:
Unsupported. AA's don't go between CT and RT. You must use a
module constructor to initialize it.
Will be supported in future?
On 13/08/2018 11:38 PM, Andrey wrote:
Hello,
I need to declare a static compile-time assoc array inside struct:
struct Test
{
enum Type : ubyte
{
One,
Two,
Three
}
static immutable string[Type] DESCRIPTION = [Ty
Hello,
I need to declare a static compile-time assoc array inside struct:
struct Test
{
enum Type : ubyte
{
One,
Two,
Three
}
static immutable string[Type] DESCRIPTION = [Type.One:
"One!", Type.Two: "It's Two...", Type.T
23 matches
Mail list logo