Re: Compiler interoperability

2023-07-07 Thread Basile B. via Digitalmars-d-learn
On Friday, 7 July 2023 at 08:19:28 UTC, Chris Katko wrote: For a specific system (Linux, e.g): What is the level of interoperability between the different D compilers; DMD, LDC, and GDC? It appears each one has different benefits, and, different experimental features. Link-time optimization

Re: `static` on module-level functions

2023-07-07 Thread IchorDev via Digitalmars-d-learn
On Friday, 7 July 2023 at 03:18:53 UTC, Richard (Rikki) Andrew Cattermole wrote: Yes, static on a free-function does not do anything. Good to know. I think the D spec should definitely be amended to explicitly mention that static *can* be applied to them, but doesn't do anything.

Re: `static` on module-level functions

2023-07-07 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Static does do something on functions when they are not free-functions. https://dlang.org/spec/attribute.html#static However yes, it does not describe what a free-function is there. https://issues.dlang.org/show_bug.cgi?id=24038

Easiest CI to build on github.com

2023-07-07 Thread Dmitry Olshansky via Digitalmars-d-learn
Simply enough dub test should pass. How do I go about it? — Dmitry Olshansky CEO @ Glow Labs https://olshansky.me https://t.me/glowlabs32

Re: Easiest CI to build on github.com

2023-07-07 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
I believe: https://github.com/dlang-community/setup-dlang

Re: Easiest CI to build on github.com

2023-07-07 Thread Dmitry Olshansky via Digitalmars-d-learn
On Friday, 7 July 2023 at 10:29:14 UTC, Richard (Rikki) Andrew Cattermole wrote: I believe: https://github.com/dlang-community/setup-dlang Thx! — Dmitry Olshansky CEO @ Glow Labs https://olshansky.me https://t.me/glowlabs32

Re: `static` on module-level functions

2023-07-07 Thread IchorDev via Digitalmars-d-learn
On Friday, 7 July 2023 at 10:01:41 UTC, Richard (Rikki) Andrew Cattermole wrote: Static does do something on functions when they are not free-functions. https://dlang.org/spec/attribute.html#static Well yes, I even mentioned that in the OP. It's just that I'd expect using `static` "incorrec

Re: `static` on module-level functions

2023-07-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/7/23 6:38 AM, IchorDev wrote: Well yes, I even mentioned that in the OP. It's just that I'd expect using `static` "incorrectly" to cause an error, like `const` does. Instead, marking something as `static` *actually* does nothing, and nothing really tells you, so it causes a bit of a plac

Re: First module

2023-07-07 Thread Cecil Ward via Digitalmars-d-learn
On Thursday, 6 July 2023 at 21:10:39 UTC, Cecil Ward wrote: I’ve written my first non-trivial module in D. See other thread. https://forum.dlang.org/thread/pfjpqcywxrmxwsncy...@forum.dlang.org I’d like to set up something to call it from other modules, and specifically I’d like to see if inli

Re: First module

2023-07-07 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
1. Compiler reads in source code provided on cli 2. It gets parsed 3. imports get looked up, if not already read in, looks in the directories provided by -I based upon the full module + package import statement 4. Finish compilation 5. Linker gets passed object files to produce some artifact li

Re: First module

2023-07-07 Thread Cecil Ward via Digitalmars-d-learn
On Friday, 7 July 2023 at 14:18:35 UTC, Richard (Rikki) Andrew Cattermole wrote: 1. Compiler reads in source code provided on cli 2. It gets parsed 3. imports get looked up, if not already read in, looks in the directories provided by -I based upon the full module + package import statement 4.

Public visible entities published by a module

2023-07-07 Thread Cecil Ward via Digitalmars-d-learn
A bit of a weird question, and I’m not sure how to word it. Say I have a module, and I’d like to list / enumerate all the public visible things that the module exports / publishes ‘ makes visible. Is there a way of doing that ? Of getting that kind of listing? I’m wondering about information

Re: Public visible entities published by a module

2023-07-07 Thread Anonymouse via Digitalmars-d-learn
On Friday, 7 July 2023 at 17:46:09 UTC, Cecil Ward wrote: A bit of a weird question, and I’m not sure how to word it. Say I have a module, and I’d like to list / enumerate all the public visible things that the module exports / publishes ‘ makes visible. Is there a way of doing that ? Of gettin

Re: Public visible entities published by a module

2023-07-07 Thread Cecil Ward via Digitalmars-d-learn
On Friday, 7 July 2023 at 19:49:06 UTC, Anonymouse wrote: On Friday, 7 July 2023 at 17:46:09 UTC, Cecil Ward wrote: [...] I did this. It's super ugly and even has `__traits(compiles)` in there, but as a quick and dirty solution it served well enough. ```d void printPublicMembersOfModule(st

Re: `static` on module-level functions

2023-07-07 Thread Paul Backus via Digitalmars-d-learn
On Friday, 7 July 2023 at 13:31:59 UTC, Steven Schveighoffer wrote: However, I can't think of a valid reason to allow `static` on a module-level scope. Applying static to a declaration at module-level should be a no-op. So maybe that's one "use" of static that can be eliminated. Well, it can