Re: Why private methods cant be virtual?

2020-09-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/21/20 7:52 PM, H. S. Teoh wrote: On Mon, Sep 21, 2020 at 07:43:30PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: [...] No, it's not a bug. It's intentional. private and package functions are final, and we aren't going to change that now, even if it makes sense to make them

Re: Why private methods cant be virtual?

2020-09-21 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Sep 21, 2020 at 07:43:30PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: [...] > No, it's not a bug. It's intentional. > > private and package functions are final, and we aren't going to change > that now, even if it makes sense to make them virtual. [...] Whoa. But why??

Re: Why private methods cant be virtual?

2020-09-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/21/20 7:30 PM, H. S. Teoh wrote: On Mon, Sep 21, 2020 at 11:17:13PM +, claptrap via Digitalmars-d-learn wrote: Seems like a completely pointless restriction to me. [...] It looks like a bug to me. Please file one if there isn't already one: https://issues.dlang.org/ T

Re: Why private methods cant be virtual?

2020-09-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 21 September 2020 at 23:30:30 UTC, H. S. Teoh wrote: It looks like a bug to me. No, it is by design: https://dlang.org/spec/function.html#virtual-functions see point 2.

Re: Why private methods cant be virtual?

2020-09-21 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Sep 21, 2020 at 11:17:13PM +, claptrap via Digitalmars-d-learn wrote: > Seems like a completely pointless restriction to me. [...] It looks like a bug to me. Please file one if there isn't already one: https://issues.dlang.org/ T -- Computerese Irregular Verb

Why private methods cant be virtual?

2020-09-21 Thread claptrap via Digitalmars-d-learn
Seems like a completely pointless restriction to me. I mean it will only affect other descendent classes declared in the same module, and they can access all the private members anyway, so it's locking the front door but leaving the back door wide open. On the other hand if you actually want

Re: Good repos to learn D

2020-09-21 Thread WebFreak001 via Digitalmars-d-learn
On Saturday, 19 September 2020 at 08:26:36 UTC, Imperatorn wrote: What are some good examples of pretty large/medium size, good structured repos in D? I'm looking for examples to learn from Thanks! I would include vibe.d in there of course! https://github.com/vibe-d/vibe.d Some legacy

Re: Resolve dub dependency

2020-09-21 Thread JN via Digitalmars-d-learn
On Monday, 21 September 2020 at 19:38:12 UTC, Paul Backus wrote: On Monday, 21 September 2020 at 19:16:17 UTC, JN wrote: I am trying to use bindbc-sdl and bindbc-wgpu at the same time. The error is: Unresolvable dependencies to package bindbc-loader: bindbc-sdl 0.19.1 depends on

Re: Resolve dub dependency

2020-09-21 Thread Paul Backus via Digitalmars-d-learn
On Monday, 21 September 2020 at 19:16:17 UTC, JN wrote: I am trying to use bindbc-sdl and bindbc-wgpu at the same time. The error is: Unresolvable dependencies to package bindbc-loader: bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0 bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0

Resolve dub dependency

2020-09-21 Thread JN via Digitalmars-d-learn
I am trying to use bindbc-sdl and bindbc-wgpu at the same time. The error is: Unresolvable dependencies to package bindbc-loader: bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0 bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0 bindbc-wgpu 0.1.0-alpha8 depends on bindbc-loader ~>0.2.1

function to tell if a string could be an identifier

2020-09-21 Thread Steven Schveighoffer via Digitalmars-d-learn
Excepting keywords (though it's OK if that's checked also), is there a function in Phobos or druntime to tell me if a string could be a valid identifier? I can write my own, but I was hoping this was already done. -Steve

More complete windows declarations

2020-09-21 Thread FreeSlave via Digitalmars-d-learn
Druntime has a limited set of declarations, lacking some COM interfaces, e.g. IShellItem and IFileOperation (the latter is understandable though as it was introduced in Vista, and I guess druntime declarartions are limited to symbols from XP), and some others are declared wrongly (e.g.

Re: DDoc generation

2020-09-21 Thread aberba via Digitalmars-d-learn
On Saturday, 19 September 2020 at 11:39:45 UTC, Jacob Carlborg wrote: On Saturday, 19 September 2020 at 07:43:24 UTC, Russel Winder wrote: Doesn't that then make the whole DDoc system fairly useless, despite it's use in Phobos? Yes. The problem is that most things in D are compared with C

How to use isLoggingEnabled?

2020-09-21 Thread Andre Pany via Digitalmars-d-learn
Hi, I am confused by the description of isLoggingEnabled. In my unittest version I want to disable logging and use this command: ``` d sharedLog = new NullLogger(LogLevel.off); ``` If have some stdout writeln coding (to avoid the timestamp / module prefix): ``` d private void

Re: How to implement fastcall ?

2020-09-21 Thread Mike Parker via Digitalmars-d-learn
On Monday, 21 September 2020 at 11:14:06 UTC, Виталий Фадеев wrote: How to implement fastcall ? ( stdcall is calling convention for pass function arguments via registers ) The supported linkage attributes are here: https://dlang.org/spec/attribute.html#linkage `extern(Windows)` is stdcall,

Re: How to implement fastcall ?

2020-09-21 Thread Виталий Фадеев via Digitalmars-d-learn
On Monday, 21 September 2020 at 11:14:06 UTC, Виталий Фадеев wrote: How to implement fastcall ? ( stdcall is calling convention for pass function arguments via registers ) On Monday, 21 September 2020 at 11:14:06 UTC, Виталий Фадеев wrote: fix... ( fastcall is calling convention for pass

How to implement fastcall ?

2020-09-21 Thread Виталий Фадеев via Digitalmars-d-learn
How to implement fastcall ? ( stdcall is calling convention for pass function arguments via registers )

Re: Good repos to learn D

2020-09-21 Thread Виталий Фадеев via Digitalmars-d-learn
On Saturday, 19 September 2020 at 08:26:36 UTC, Imperatorn wrote: What are some good examples of pretty large/medium size, good structured repos in D? I'm looking for examples to learn from Thanks! I often looked into the D std source code: C:\D\dmd2\src\phobos\std

Re: dub sub-projects

2020-09-21 Thread Vladimirs Nordholm via Digitalmars-d-learn
On Monday, 21 September 2020 at 08:02:46 UTC, Виталий Фадеев wrote: On Sunday, 20 September 2020 at 18:24:31 UTC, Vladimirs Nordholm wrote: Hello. I wonder what the best-practice is for dub projects with sub-projects. Excuse me if the terminology is wrong. Let me explain my situation. [...]

Re: dub sub-projects

2020-09-21 Thread Виталий Фадеев via Digitalmars-d-learn
On Sunday, 20 September 2020 at 18:24:31 UTC, Vladimirs Nordholm wrote: Hello. I wonder what the best-practice is for dub projects with sub-projects. Excuse me if the terminology is wrong. Let me explain my situation. [...] Check this: https://github.com/vitalfadeev/dub-subprojects may like