On Monday, 22 September 2025 at 00:27:09 UTC, Steven
Schveighoffer wrote:
On Sunday, 21 September 2025 at 20:33:11 UTC, user1234 wrote:
On Saturday, 20 September 2025 at 02:36:47 UTC, Steven
Schveighoffer wrote:
Looking at historical compilers, the `alias ... =` syntax was
added in 2.087.0. B
On Sunday, 21 September 2025 at 20:33:11 UTC, user1234 wrote:
On Saturday, 20 September 2025 at 02:36:47 UTC, Steven
Schveighoffer wrote:
What is a function type? It's the internal type that the
compiler has for a function, which you actually cannot express
in syntax.
Actually D has a syntax
On Saturday, 20 September 2025 at 02:36:47 UTC, Steven
Schveighoffer wrote:
What is a function type? It's the internal type that the
compiler has for a function, which you actually cannot express
in syntax.
Actually D has a syntax to expression function types:
```d
alias FT = void(int);
void
On 9/18/25 10:18 PM, Steven Schveighoffer wrote:
> On Thursday, 18 September 2025 at 18:10:13 UTC, Ali Çehreli wrote:
>> // Not a delegate:
>> static assert(is (typeof(twice) == function));
> You are mistaking the is expression for a function test with the
> function pointer type.
I dis
On 08.09.2025 22:55, Neto wrote:
On Monday, 8 September 2025 at 16:51:09 UTC, Serg Gini wrote:
And not sure if ecosystem was a significant weight in the decision.
Why isn't D production ready?
I've been trying to figure it out for a long time. As long as I've known
this person in D communi
On Saturday, 13 September 2025 at 00:43:38 UTC, Brother Bill
wrote:
I'm not clear about why 'class'es are on the 'avoid' list.
They are on some peoples' avoiding list. It does not mean it
should be on yours.
I can tell you one thing with 100% certainty - if D had no
classes I would not be u
On Thursday, 11 September 2025 at 12:07:35 UTC, Serg Gini wrote:
On Wednesday, 10 September 2025 at 03:46:37 UTC, felixfxu wrote:
On Monday, 8 September 2025 at 20:10:52 UTC, Sergey wrote:
being focused on required important tasks = complicated
I don't quite understand the item above. What's
On Tuesday, 9 September 2025 at 00:40:31 UTC, Brother Bill wrote:
https://tour.dlang.org/tour/en/gems/opdispatch-opapply
This states: "Any unknown member function call to that type is
passed to opDispatch, passing the unknown member function's
name as a string template parameter."
Specs are
On Monday, 8 September 2025 at 16:43:10 UTC, Neto wrote:
this is the reasoning
https://github.com/microsoft/typescript-go/discussions/411
I wonder if they did consider D language. First comment says
why Rust would be a good choice "If not C#, I would have
expected Rust, since that's where the
On Wednesday, 10 September 2025 at 13:13:34 UTC, Richard (Rikki)
Andrew Cattermole wrote:
Placement new is @system, but you wanted to use it in an @safe
function iff the constructor to be called is @safe as well.
Pretty much.
The reason placement new is @system is because of double-init.
It c
Page 119 of Programming in D
It seems odd that == null and is null have different values?
Is this a bug or feature?
If a feature, what is the meanings of == null vs. is null?
source/app.d
```
import std.stdio;
void main()
{
// value[key]
int[string] dayNumbers =
// key :
On Tuesday, 9 September 2025 at 12:04:07 UTC, Brother Bill wrote:
When commenting out the callHome() in struct C, it fails.
Obviously if callHome() is explicitly created, it works.
If C does not have callHome() method, then
```d
mixin("content." ~ name)(vals);
```
will simply fail, beca
Is there any reason to pick one of these vs. another one, or are
they all equivalent?
If equivalent, it would seem that immutable appears to be the
'strongest', whereas enum has fewer keystrokes.
Is there a D 'best practice' for this?
```
const int foo1 = 42;
enum foo2 = 42;
On Saturday, 20 September 2025 at 01:46:47 UTC, monkyyy wrote:
This was before my time. I was under the impression that it was
somehow class and oo related badness when people talked about
using TypeInfo; but when I my own experiments say that typeinfo
is just another tool
I see 3k lines of c
On Friday, 19 September 2025 at 16:58:38 UTC, Ali Çehreli wrote:
On 9/18/25 10:18 PM, Steven Schveighoffer wrote:
> On Thursday, 18 September 2025 at 18:10:13 UTC, Ali Çehreli
wrote:
>> // Not a delegate:
>> static assert(is (typeof(twice) == function));
> You are mistaking the is expre
This was before my time. I was under the impression that it was
somehow class and oo related badness when people talked about
using TypeInfo; but when I my own experiments say that typeinfo
is just another tool
I see 3k lines of code compared to my 50; Im going to say its but
the postmorden s
On Tuesday, 9 September 2025 at 01:24:59 UTC, monkyyy wrote:
```
// I suggest a habit of avoiding simple names when generating
mixin code
```
Please provide an example where providing simple names causes
'trouble'.
On Sat, Sep 13, 2025 at 12:43:38AM +, Brother Bill via Digitalmars-d-learn
wrote:
> I'm not clear about why 'class'es are on the 'avoid' list.
Whose avoid list?
I'd say that I usually don't use classes, not because I'm trying to
avoid them, but b
On Thursday, 18 September 2025 at 18:10:13 UTC, Ali Çehreli wrote:
As stated by multiple people, most nested functions will be
'delegates'. However, a nested function is a 'function' if it
does not touch local scope:
```d
void main() {
int twice(int i) {
return i * 2;
}
//
On Tuesday, 9 September 2025 at 00:40:31 UTC, Brother Bill wrote:
https://tour.dlang.org/tour/en/gems/opdispatch-opapply
This states: "Any unknown member function call to that type is
passed to opDispatch, passing the unknown member function's
name as a string template parameter."
[...]
yo
cond and mutex are global variables,
and "Starting with dmd version 2.030, the default storage class
for statics and globals will be thread local storage (TLS)"
https://dlang.org/articles/migrate-to-shared.html
As stated by multiple people, most nested functions will be 'delegates'.
However, a nested function is a 'function' if it does not touch local scope:
void main() {
int twice(int i) {
return i * 2;
}
// Not a delegate:
static assert(is (typeof(twice) == function));
}
Ali
On Wednesday, 17 September 2025 at 22:16:50 UTC, Brother Bill
wrote:
In the following from Programming in D, page 483, we use
function keyword.
I expect that the first int in
```
int function(int);
```
represents the return value.
What does the second (int) refer to?
Second int is the type
On Thursday, 11 September 2025 at 11:47:40 UTC, Dennis wrote:
The trick that's used in druntime is putting the part that
still needs to be checked for attributes inside an `if (false)`
block, for example:
```d
private T moveImpl(T)(return scope ref T source)
{
// Properly infer safety from
On Wednesday, 17 September 2025 at 22:16:50 UTC, Brother Bill
wrote:
In the following from Programming in D, page 483, we use
function keyword.
I expect that the first int in
```
int function(int);
```
represents the return value.
What does the second (int) refer to?
Then there is another ex
On Wednesday, 17 September 2025 at 22:16:50 UTC, Brother Bill
wrote:
return value => increment + value; // ← compilation ERROR
```d
void main()
{
auto calc = makeCalculator;
writeln (calc (1));
}
alias Calculator = int function(int);
Calculator makeCalculator()
{
On Wednesday, 10 September 2025 at 14:45:52 UTC, Richard (Rikki)
Andrew Cattermole wrote:
The caller is responsible for guaranteeing that the memory
passed in is uninitialized, and that behavior is @system.
Yeah but I should be able to mark it as `@trusted` without
trusting some random bloody
On Wednesday, 17 September 2025 at 22:16:50 UTC, Brother Bill
wrote:
Then there is another example with 'delegate' instead of
'function.
```
import std.stdio;
void main()
{
}
alias Calculator = int function(int);
Calculator makeCalculator()
{
int increment = 10;
return value
On Monday, 8 September 2025 at 14:32:32 UTC, Brother Bill wrote:
https://tour.dlang.org/tour/en/basics/delegates
This is so simple. What is D complaining about?
Should this also work with a Template, as shown?
```
import std.stdio;
void main()
{
// auto add(T)(T lhs, T rhs)
//
Ok, gotcha.
Placement new is @system, but you wanted to use it in an @safe function
iff the constructor to be called is @safe as well.
The reason placement new is @system is because of double-init. It can't
be a safe operation.
On Wed, Sep 17, 2025 at 10:16:50PM +, Brother Bill via Digitalmars-d-learn
wrote:
> In the following from Programming in D, page 483, we use function keyword.
>
> I expect that the first int in
> ```
> int function(int);
> ```
>
> represents the return value.
>
On Wednesday, 17 September 2025 at 22:16:50 UTC, Brother Bill
wrote:
```
import std.stdio;
void main()
{
}
alias Calculator = int function(int);
Calculator makeCalculator()
{
int increment = 10;
return value => increment + value; // ← compilation ERROR
}
```
function is alm
In the following from Programming in D, page 483, we use function
keyword.
I expect that the first int in
```
int function(int);
```
represents the return value.
What does the second (int) refer to?
Then there is another example with 'delegate' instead of
'function.
```
import std.stdio;
This works:
```
import std.stdio;
void main()
{
foo();
}
void foo() {
int addMyInts(int lhs, int rhs) {
return lhs + rhs;
}
int doSomething(int delegate(int, int) doer)
{
// call passed function
return doer(
On Wednesday, 10 September 2025 at 14:25:05 UTC, IchorDev wrote:
On Wednesday, 10 September 2025 at 14:01:29 UTC, Brother Bill
wrote:
what is the meanings of == null vs. is null?
You have already asked this question [here
before](https://forum.dlang.org/thread/nvaiwzvcrahnwzior...@forum.dlang
On Friday, 12 September 2025 at 15:20:38 UTC, Brother Bill wrote:
Is is possible to 'disable' .init for a struct?
You do not want .init?
Fine:
```d
Archive noInit = void;
```
On Thursday, 11 September 2025 at 11:47:40 UTC, Dennis wrote:
On Wednesday, 10 September 2025 at 12:29:24 UTC, IchorDev wrote:
If anyone has any ideas, please let me know.
The trick that's used in druntime is putting the part that
still needs to be checked for attributes inside an `if (false)
On Wednesday, 17 September 2025 at 14:57:19 UTC, monkyyy wrote:
[snip]
Sorry, I'm having trouble understanding what you're trying to do.
On Friday, 12 September 2025 at 15:20:38 UTC, Brother Bill wrote:
Is is possible to 'disable' .init for a struct?
No (and honestly it's bad style to break the constructors)
On 9/8/25 12:55 PM, Neto wrote:
> On Monday, 8 September 2025 at 16:51:09 UTC, Serg Gini wrote:
>> On Monday, 8 September 2025 at 16:43:10 UTC, Neto wrote:
>> Yes, I know there are companies that are using it in production.
>> Even several big ones like Weka and Symmetry.
> Why isn't D productio
On Wednesday, 10 September 2025 at 20:23:28 UTC, monkyyy wrote:
[snip]
Documentation for mir iterators is here:
http://mir-algorithm.libmir.org/mir_ndslice_iterator.html
If you want to use mir without using the GC. You can allocate
with malloc, custom allocator, or use an RC allocator.
http:
On Wednesday, 17 September 2025 at 12:06:32 UTC, jmh530 wrote:
On Wednesday, 10 September 2025 at 20:23:28 UTC, monkyyy wrote:
[snip]
Documentation for mir iterators is here:
http://mir-algorithm.libmir.org/mir_ndslice_iterator.html
I see nd-iota but it seems under powered(handling only the
On Saturday, 13 September 2025 at 01:00:17 UTC, Mike Parker wrote:
What 'avoid list'?
Mine in the last thread
On Monday, 15 September 2025 at 20:23:23 UTC, monkyyy wrote:
mir is a lib that has nd math; that allot of people know is
meta programming to hell and back but no one can tell ya how to
use it
nd is "N" as anonymous int and D as in dimension, 2d vs 3d vs
... 99d
Cool... thanks. A world I nev
On Monday, 15 September 2025 at 20:10:22 UTC, Andy Valencia wrote:
On Monday, 15 September 2025 at 17:07:36 UTC, monkyyy wrote:
On Monday, 15 September 2025 at 16:59:58 UTC, Dejan Lekic
wrote:
On Wednesday, 10 September 2025 at 20:23:28 UTC, monkyyy
wrote:
I asked
does a preexisting nd array
On Monday, 15 September 2025 at 17:07:36 UTC, monkyyy wrote:
On Monday, 15 September 2025 at 16:59:58 UTC, Dejan Lekic wrote:
On Wednesday, 10 September 2025 at 20:23:28 UTC, monkyyy wrote:
I asked
does a preexisting nd array iterator exist?
got links to mir, docs I can barely read (srsly ma
On Monday, 15 September 2025 at 16:59:58 UTC, Dejan Lekic wrote:
On Wednesday, 10 September 2025 at 20:23:28 UTC, monkyyy wrote:
I asked
does a preexisting nd array iterator exist?
got links to mir, docs I can barely read (srsly math language
is anticomprehension)
I can barely read your po
On Wednesday, 10 September 2025 at 20:23:28 UTC, monkyyy wrote:
I asked
does a preexisting nd array iterator exist?
got links to mir, docs I can barely read (srsly math language
is anticomprehension)
I can barely read your posts, yet I do not complain...
On Wednesday, 10 September 2025 at 20:23:28 UTC, monkyyy wrote:
I asked
does a preexisting nd array iterator exist?
got links to mir, docs I can barely read (srsly math language
is anticomprehension)
ndslice allocates, so, hottake misnamed. A slice is a reference
to an array, a dynmaic arr
On Sunday, 14 September 2025 at 02:50:42 UTC, Jonathan M Davis
wrote:
Memory gets weird on top of that because of the desire to use
the GC with pure functions and the argument that two objects
with the same value are the same even though they're different
places in memory (so whether they're re
On Friday, September 12, 2025 3:48:49 AM Mountain Daylight Time IchorDev via
Digitalmars-d-learn wrote:
> Recently I wanted to write a pure function that returns an
> unpredictable number, so I decided to use RDTSC (and any
> equivalent instruction for other CPU architectures) to do this
On Friday, September 12, 2025 9:20:38 AM Mountain Daylight Time Brother Bill
via Digitalmars-d-learn wrote:
> Is is possible to 'disable' .init for a struct?
Technically, yes, but you should absolutely never do it, and it will likely
become illegal to do so at some point in the fut
On Friday, September 12, 2025 5:58:57 PM Mountain Daylight Time Brother Bill
via Digitalmars-d-learn wrote:
> Is it time to consider D 3.x.x, that takes the best of D,
> discards the mistakes, the mud and the hair, so most well written
> D 2.x.x programs still work?
Unless, something si
On Friday, September 12, 2025 6:43:38 PM Mountain Daylight Time Brother Bill
via Digitalmars-d-learn wrote:
> I'm not clear about why 'class'es are on the 'avoid' list.
It's more that there's rarely any reason to use classes in D for the average
program. If
On Saturday, 13 September 2025 at 15:26:15 UTC, H. S. Teoh wrote:
On Sat, Sep 13, 2025 at 12:43:38AM +, Brother Bill via
Digitalmars-d-learn wrote:
[...]
Whose avoid list?
[...]
what are those real profiles that you're using now?
On Monday, 8 September 2025 at 20:10:52 UTC, Sergey wrote:
On Monday, 8 September 2025 at 19:55:20 UTC, Neto wrote:
Why isn't D production ready?
One has to ask why to choose a production language.
1. First one has to be aware that it exists.
a. See Eiffel and D
Eiffel has been in prod
On Thursday, 11 September 2025 at 09:51:55 UTC, Mikhail wrote:
I don't understand what I should do? Define global variables as
shared?
Andrea Fontana reply more good than my.
But I hope you read article for new knowledges.
Anyway, IMHO, if you want use global variable from two ore more
thread
On Friday, 12 September 2025 at 15:24:46 UTC, Monkyyy wrote:
On Friday, 12 September 2025 at 15:20:38 UTC, Brother Bill
wrote:
Is is possible to 'disable' .init for a struct?
No (and honestly it's bad style to break the constructors)
Please expound on why its 'bad style' to disable construct
On Friday, 12 September 2025 at 21:46:51 UTC, monkyyy wrote:
On Friday, 12 September 2025 at 20:10:25 UTC, H. S. Teoh wrote:
Phobos code was legendary for being a standard library that
didn't make your head hurt when you read it. (If you've ever
tried reading the source code for Glibc, or the s
I'm not clear about why 'class'es are on the 'avoid' list.
D has excellent support for Single inheritance, Interfaces,
Design by Contract (DbC), GC, etc.
I'm aware that there is a small run time cost for selecting the
right virtual method.
To reduce this cost, one must final-ize methods that
On Friday, 12 September 2025 at 23:58:57 UTC, Brother Bill wrote:
On Friday, 12 September 2025 at 21:46:51 UTC, monkyyy wrote:
On Friday, 12 September 2025 at 20:10:25 UTC, H. S. Teoh wrote:
Phobos code was legendary for being a standard library that
didn't make your head hurt when you read it.
On Saturday, 13 September 2025 at 00:43:38 UTC, Brother Bill
wrote:
I'm not clear about why 'class'es are on the 'avoid' list.
D has excellent support for Single inheritance, Interfaces,
Design by Contract (DbC), GC, etc.
I'm aware that there is a small run time cost for selecting the
right vi
On Friday, 12 September 2025 at 20:10:25 UTC, H. S. Teoh wrote:
Phobos code was legendary for being a standard library that
didn't make your head hurt when you read it. (If you've ever
tried reading the source code for Glibc, or the standard
library for almost any other language, really, you'll
Is is possible to 'disable' .init for a struct?
source/app.d
```
import std.stdio;
void main()
{
// Can still create Archive with an empty filename. We can't
have that.
auto noDefault = Archive.init;
writefln("fileName: [%s]", noDefault.fileName);
}
// adding a constructor au
On Fri, Sep 12, 2025 at 03:41:15PM +, realhet via Digitalmars-d-learn wrote:
> On Friday, 12 September 2025 at 15:28:58 UTC, Monkyyy wrote:
> > On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
> > > Hi,
> > >
> > > ```d
> > > import std
On Fri, Sep 12, 2025 at 06:19:46PM +, Brother Bill via Digitalmars-d-learn
wrote:
[...]
> As a newbie to D, really trying to understand it, I am merely trying
> to uncover how to effectively use D. When Programming in D book, page
> 292, section 52.4 talks about 'postblit
On Friday, 12 September 2025 at 18:19:46 UTC, Brother Bill wrote:
Is there a 'style' guide for D, such as: Do this, Don't do
that, avoid this, etc.?
Someone will link the "offical" style guide, but thats nothing id
follow
"There are these features in the language, but you should avoid
the
On Friday, 12 September 2025 at 15:38:15 UTC, Monkyyy wrote:
On Friday, 12 September 2025 at 15:31:37 UTC, Brother Bill
wrote:
On Friday, 12 September 2025 at 15:24:46 UTC, Monkyyy wrote:
On Friday, 12 September 2025 at 15:20:38 UTC, Brother Bill
wrote:
Is is possible to 'disable' .init for a
On Friday, 12 September 2025 at 13:27:53 UTC, realhet wrote:
(x); <- Is not a construct that comes to my mind as useful,
but this was it. This forces the mixin to expect an expression
and not a statement.
Thanks for sharing it! - I did not know this works. :)
On Friday, 12 September 2025 at 12:23:21 UTC, Nick Treleaven
wrote:
On Friday, 12 September 2025 at 09:17:10 UTC, realhet wrote:
On Friday, 12 September 2025 at 08:44:47 UTC, Stefan Koch
wrote:
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
I did a complete 'martix' of these com
On Friday, 12 September 2025 at 09:55:01 UTC, IchorDev wrote:
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Is this a feature or a bug? :D
You will have to start writing much weirder code than this to
Yea, I don't think I dare to do such crazy things, like an lambda
in an UDA
On Friday, 12 September 2025 at 15:28:58 UTC, Monkyyy wrote:
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Hi,
```d
import std;
[...]
It's seeing the eof of the mix file no?
This is the smallest example so far:
```d
import std;
void main() {
( mixin("(()=>1)()") ); //i
On Friday, 12 September 2025 at 15:31:37 UTC, Brother Bill wrote:
On Friday, 12 September 2025 at 15:24:46 UTC, Monkyyy wrote:
On Friday, 12 September 2025 at 15:20:38 UTC, Brother Bill
wrote:
Is is possible to 'disable' .init for a struct?
No (and honestly it's bad style to break the constru
On Friday, 12 September 2025 at 14:48:43 UTC, Kagamin wrote:
malloc is weakly pure, because it returns mutable pointer. The
difference is when you call it from strongly pure function,
then it doesn't matter, how many times malloc was called.
And if the compiler tries to memoise it?
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Hi,
```d
import std;
[...]
It's seeing the eof of the mix file no?
malloc is weakly pure, because it returns mutable pointer. The
difference is when you call it from strongly pure function, then
it doesn't matter, how many times malloc was called.
On Friday, 12 September 2025 at 09:17:10 UTC, realhet wrote:
On Friday, 12 September 2025 at 08:44:47 UTC, Stefan Koch wrote:
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Hi, thanks for quick answer!
When I turn the string mixin into a statement by putting a `;`
at its end, th
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Is this a feature or a bug? :D
You will have to start writing much weirder code than this to
find compiler bugs in D because when a bug is fixed, a new test
is created to make sure it doesn't regress. Surface-level
features are usu
On Thursday, 11 September 2025 at 08:06:17 UTC, IchorDev wrote:
But that's the thing: all I want is to construct objects into
*freshly-allocated*, *uninitialised memory*; so my desired
use-case has a safe interface and can therefore be marked
`@trusted`. However the constructor is a wildcard, s
Recently I wanted to write a pure function that returns an
unpredictable number, so I decided to use RDTSC (and any
equivalent instruction for other CPU architectures) to do this,
since the compiler allows RDTSC to be marked as `pure`.
However, in the end I discarded this idea because I figured
On Thursday, 11 September 2025 at 17:16:35 UTC, Paul Backus wrote:
```d
void inferSystem() @system pure nothrow @nogc {}
T* example(T)() {
static if (!isSafe!(() { new T(); })
inferSystem();
return (() @trusted => new (new void[](T.sizeof)) T())();
}
```
Unfortunately that woul
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Is this a feature or a bug? :D
Is there a way to make this processing_and_optional_returning
thing better?
It is a bug in your code.
Change line 6 to
```d
(){ val += 1; return val; }();
```
After the added `;` it should wo
On Friday, 12 September 2025 at 08:44:47 UTC, Stefan Koch wrote:
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Hi, thanks for quick answer!
When I turn the string mixin into a statement by putting a `;` at
its end, the
enum bla = `(){return 4;}();`
`mixin(bla);` Case works p
On Friday, 12 September 2025 at 08:36:42 UTC, realhet wrote:
Hi,
```d
import std;
void main() {
int val = 4;
enum prog = q{
(){ val += 1; return val; }()
};
//mixin(prog); //
auto dummy = mixin(prog); //Must capture the return value,
otherwise it hallucinates EOF.
Hi,
```d
import std;
void main() {
int val = 4;
enum prog = q{
(){ val += 1; return val; }()
};
//mixin(prog); //
auto dummy = mixin(prog); //Must capture the return value,
otherwise it hallucinates EOF.
writeln(val);
}
```
When uncommentingmixin(prog);
It
On 11/09/2025 12:29 AM, IchorDev wrote:
I thought the 'placement new' feature might replace my need for
`emplace`, but I don't see a way to mark a placement new as `@trusted`
without marking the call to the object's constructor as `@trusted` also?
```d
void main() @safe{
X x;
//pla
https://tour.dlang.org/tour/en/gems/opdispatch-opapply
This states: "Any unknown member function call to that type is
passed to opDispatch, passing the unknown member function's name
as a string template parameter."
So I tried that. But the compiler didn't like it.
How should I play the game
On Tuesday, 9 September 2025 at 11:57:54 UTC, Brother Bill wrote:
On Tuesday, 9 September 2025 at 01:24:59 UTC, monkyyy wrote:
```
// I suggest a habit of avoiding simple names when generating
mixin code
```
Please provide an example where providing simple names causes
'trouble'.
```d
im
On Tuesday, 9 September 2025 at 21:08:59 UTC, drug007 wrote:
On 09.09.2025 01:53, Kapendev wrote:
On Monday, 8 September 2025 at 21:25:25 UTC, drug007 wrote:
On 08.09.2025 22:55, Neto wrote:
On Monday, 8 September 2025 at 16:51:09 UTC, Serg Gini wrote:
And not sure if ecosystem was a signifi
On Wed, Sep 10, 2025 at 05:15:16PM +, monkyyy via Digitalmars-d-learn wrote:
[...]
> I just do always enum; going all in on compile time abstractions
Be careful, this may not always be what you want. For example:
```d
enum data = [ 1, 2, 3 ];
void main() {
auto buffer = d
On Tuesday, 9 September 2025 at 20:56:19 UTC, Steven
Schveighoffer wrote:
On Tuesday, 9 September 2025 at 20:08:06 UTC, monkyyy wrote:
On Tuesday, 9 September 2025 at 19:17:11 UTC, Steven
Schveighoffer wrote:
In short `opDispatch` only is valid if it compiles. If it
doesn't compile, it's as i
On Wednesday, 10 September 2025 at 03:46:37 UTC, felixfxu wrote:
On Monday, 8 September 2025 at 20:10:52 UTC, Sergey wrote:
being focused on required important tasks = complicated
I don't quite understand the item above. What's dlang's
`"required important tasks"` now?
This one actually ove
On Wednesday, 10 September 2025 at 12:29:24 UTC, IchorDev wrote:
If anyone has any ideas, please let me know.
The trick that's used in druntime is putting the part that still
needs to be checked for attributes inside an `if (false)` block,
for example:
https://github.com/dlang/dmd/blob/c817
On Thursday, 11 September 2025 at 09:51:55 UTC, Mikhail wrote:
On Thursday, 11 September 2025 at 09:40:22 UTC, novicetoo wrote:
cond and mutex are global variables,
and "Starting with dmd version 2.030, the default storage
class for statics and globals will be thread local storage
(TLS)"
http
On Thursday, 11 September 2025 at 09:40:22 UTC, novicetoo wrote:
cond and mutex are global variables,
and "Starting with dmd version 2.030, the default storage class
for statics and globals will be thread local storage (TLS)"
https://dlang.org/articles/migrate-to-shared.html
I don't understan
On Thursday, 11 September 2025 at 09:29:29 UTC, Mikhail wrote:
I wrote simple example to learn how the work Conditions.
But program closed with signal, what's wrong?
import std.stdio;
import core.thread;
import core.sync.condition;
import core.sync.mutex;
Condition cond;
Mutex mutex;
void thr
I wrote simple example to learn how the work Conditions.
But program closed with signal, what's wrong?
import std.stdio;
import core.thread;
import core.sync.condition;
import core.sync.mutex;
Condition cond;
Mutex mutex;
void threadFunction()
{
writeln("This is running in a separate threa
On Wednesday, 10 September 2025 at 17:33:48 UTC, H. S. Teoh wrote:
`enum` defines a compile-time constant. It occupies no space,
and its value is "copied" into every expression in which it
appears.
[...]
`const` and `immutable` are type qualifiers, and declaring a
constant with them creates a
On Thursday, 11 September 2025 at 03:47:02 UTC, Richard (Rikki)
Andrew Cattermole wrote:
It did go through the DIP process.
Blast, you're right. I've even seen the DIP Development post for
it before, too! I didn't read into it at the time. I could've
probably identified this problem and raise
On Thursday, 11 September 2025 at 04:19:02 UTC, Paul Backus wrote:
The problem is not really with placement new, it's with
constructors. Constructors are allowed to mutate immutable
objects (under the assumption that they are initializing a
newly-created object). If you call a constructor twice
1 - 100 of 2386 matches
Mail list logo