On Tuesday, 1 March 2022 at 08:16:13 UTC, Mike Parker wrote:
On Tuesday, 1 March 2022 at 07:16:11 UTC, bauss wrote:
Right now if you want to add an additional cast then you have
to implement ALL the default behaviors and then add your
custom cast.
It's two template functions like the OP
On Tuesday, 1 March 2022 at 08:40:12 UTC, Vijay Nayar wrote:
I've randomly encountered a strange error, and I cannot find
any explanation for it in the official documentation of syntax.
Essentially, a class cannot call function overload in a
super-class if the class itself contains an
On Tuesday, 1 March 2022 at 09:06:59 UTC, vit wrote:
On Tuesday, 1 March 2022 at 08:40:12 UTC, Vijay Nayar wrote:
I've randomly encountered a strange error, and I cannot find
any explanation for it in the official documentation of syntax.
[...]
Here is more info (3.):
I've randomly encountered a strange error, and I cannot find any
explanation for it in the official documentation of syntax.
Essentially, a class cannot call function overload in a
super-class if the class itself contains an override. Is this a
bug? Is this on purpose? Take a look at
On Tuesday, 1 March 2022 at 08:40:12 UTC, Vijay Nayar wrote:
I've randomly encountered a strange error, and I cannot find
any explanation for it in the official documentation of syntax.
[...]
Here is more info (3.):
On Tuesday, 1 March 2022 at 09:10:46 UTC, Vijay Nayar wrote:
I'm a bit surprised at this behavior though. Do you happen to
know why it is considered bad to take into account the
overloads of a super-class when resolving a call in a
derived-class?
https://dlang.org/articles/hijack.html
On Tuesday, 1 March 2022 at 08:16:13 UTC, Mike Parker wrote:
On Tuesday, 1 March 2022 at 07:16:11 UTC, bauss wrote:
Right now if you want to add an additional cast then you have
to implement ALL the default behaviors and then add your
custom cast.
It's two template functions like the OP
On Tuesday, 1 March 2022 at 07:16:11 UTC, bauss wrote:
Right now if you want to add an additional cast then you have
to implement ALL the default behaviors and then add your custom
cast.
It's two template functions like the OP used: one for T to catch
everything, and one specialization.
If the type is ``Color`` I think the compiler should allow
``GRAY`` if it is a member of ``Color``, isn't how strong
statically typed language should work? I wonder what is the
rational against it? How hard would it be to allow it?
On 3/1/22 7:22 AM, meta wrote:
If the type is ``Color`` I think the compiler should allow ``GRAY`` if
it is a member of ``Color``, isn't how strong statically typed language
should work? I wonder what is the rational against it? How hard would it
be to allow it?
The problem is how the
On 2/19/22 6:37 PM, Vijay Nayar wrote:
Do they
get an automatic implied name like `_` or something?
Yes, `_param_0`, `_param_1`, etc.
Don't depend on this though, I think it's an implementation detail.
-Steve
Hello all,
I'm not sure how to set the compile time parameters in D's SQLite
module particular the items that take multiple parameters, for
example in the C API manual `SQLITE_CONFIG_MMAP_SIZE` takes two
`sqlite3_int64`. How do I set these? Do I just write something
like
```
enum
Have you tried this new GC option which seems to solve the
stop-the-world issue:
https://dlang.org/changelog/2.098.0.html#forkgc
Any experience?
Ali
On Tue, Mar 01, 2022 at 08:59:46PM +, data pulverizer via
Digitalmars-d-learn wrote:
> Hello all,
>
> I'm not sure how to set the compile time parameters in D's SQLite
> module particular the items that take multiple parameters, for example
> in the C API manual `SQLITE_CONFIG_MMAP_SIZE`
On Tuesday, 1 March 2022 at 20:59:46 UTC, data pulverizer wrote:
Hello all,
I'm not sure how to set the compile time parameters in D's
SQLite module particular the items that take multiple
parameters, for example in the C API manual
`SQLITE_CONFIG_MMAP_SIZE` takes two `sqlite3_int64`. How do
On Monday, 28 February 2022 at 12:18:37 UTC, Mike Parker wrote:
Then you can mixin aliases for any named enum members you'd
like:
```d
mixin(expandEnum!Colors);
```
Meanwhile it's very skillful :)
It is possible to change all the color palette with a second
parameter:
```d
import
On Tuesday, 1 March 2022 at 13:15:09 UTC, meta wrote:
enum Color
{ GRAY }
void setColor(Color color);
setColor(GRAY);
Then that defeats the purpose of having named enums.
On 3/1/22 07:19, Mike Parker wrote:
> On Tuesday, 1 March 2022 at 13:15:09 UTC, meta wrote:
>
>>
>> enum Color
>> { GRAY }
>>
>> void setColor(Color color);
>>
>> setColor(GRAY);
>
> Then that defeats the purpose of having named enums.
Yes and no.
meta is pointing at a
On Tuesday, 1 March 2022 at 04:59:49 UTC, Mike Parker wrote:
On Tuesday, 1 March 2022 at 04:29:56 UTC, cc wrote:
```d
struct A {}
class B {
A opCast(T : A)() {
return A();
}
}
void main() {
auto b = new B();
destroy(b);
}
```
fails with
```
Hello,
what's a dual context as in the deprecation message?
```d
struct MockFile {
[...]
void writef(alias fmt, A...)(A args) { // Deprecation: function
'writef': function requires a dual-context, which is deprecated
import std.format: format;
write(format!fmt(args));
}
On Tuesday, 1 March 2022 at 14:51:47 UTC, wjoe wrote:
Hello,
what's a dual context as in the deprecation message?
It means you have a struct or class member function that accesses
its calling context via a template alias parameter.
See this bug report for more information:
On Tuesday, 1 March 2022 at 16:40:50 UTC, Paul Backus wrote:
It's a bug in druntime. `destroy` needs to reinterpret the
class reference as a `void*` to pass it to `rt_finalize`:
https://github.com/dlang/druntime/blob/v2.098.1/src/object.d#L4209
However, `cast(void*)` is not the correct way
On Tuesday, 1 March 2022 at 12:29:56 UTC, Steven Schveighoffer
wrote:
On 3/1/22 7:22 AM, meta wrote:
If the type is ``Color`` I think the compiler should allow
``GRAY`` if it is a member of ``Color``, isn't how strong
statically typed language should work? I wonder what is the
rational
23 matches
Mail list logo