On Sunday, 12 June 2022 at 05:05:46 UTC, forkit wrote:
Is it possible to create a package.d, consisting of (for
example), two modules, where each module can access private
declarations within each other.
For this to be possible: You must first collect all modules in
the directory with the sam
On Friday, 10 June 2022 at 06:17:54 UTC, bauss wrote:
On Thursday, 9 June 2022 at 23:50:10 UTC, user1234 wrote:
There's [been attempts] to expose it, exactly so that users
can generate unique names, but that did not found its path in
the compiler.
[been attempts]: https://github.com/dlang/d
On Thursday, 9 June 2022 at 21:20:27 UTC, JG wrote:
In doing so I wanted to produce unique identifiers (something
like gensym in racket.) I did this in a very hacky way:
[...]
Is there some way to ask the compiler for a unique name or a
better way of achieving this?
Here's a `gensym` implemen
On Sunday, 12 June 2022 at 18:45:27 UTC, Paul Backus wrote:
On Thursday, 9 June 2022 at 21:20:27 UTC, JG wrote:
[...]
[...]
[...]
Here's a `gensym` implementation I came up with a while back:
```d
enum gensym = q{"_gensym" ~ __traits(identifier,
{})["__lambda".length .. $]};
// Works mul
On Tuesday, 7 June 2022 at 18:37:13 UTC, Steven Schveighoffer
wrote:
[...]
My very common use of `scope(failure)` for my DB code:
```d
conn.exec("START TRANSACTION");
scope(success) conn.exec("COMMIT");
scope(failure) conn.exec("ROLLBACK");
```
Are there multiple (successful) returns in your
On Sunday, 5 June 2022 at 23:57:19 UTC, Steven Schveighoffer
wrote:
On 6/5/22 6:09 PM, kdevel wrote:
On Sunday, 5 June 2022 at 20:53:32 UTC, Steven Schveighoffer
wrote:
[...]
For this purpose nobody needs a separate subclass named
`Error`. That works with `Exception`s.
You can use Exceptions
On Friday, 10 June 2022 at 20:47:14 UTC, Steven Schveighoffer
wrote:
On 6/10/22 4:33 PM, Antonio wrote:
...
`map` calls the lambda for each call to `front`. If you want a
cached version, use `cache`:
Thank you very much, Steve
On Sunday, 12 June 2022 at 05:46:17 UTC, Mike Parker wrote:
I don't get it.
How does this enable one module to access the private parts of
another module?
Isn't 'private' *always* private to the module?
The idea I had, was to be able to spread a 'module' over more
than one file - for the
On Sunday, 12 June 2022 at 23:29:29 UTC, forkit wrote:
I don't get it.
How does this enable one module to access the private parts of
another module?
It doesn't. But what you were describing in your post is
package-level access. By keeping it the cross-module access in a
subpackage, packa
On Sunday, 12 June 2022 at 05:05:46 UTC, forkit wrote:
Is it possible to create a package.d, consisting of (for
example), two modules, where each module can access private
declarations within each other.
In essence, declaring 'a module level friendship', or a kind of
'extended module' if you
10 matches
Mail list logo