On Friday, 10 May 2024 at 01:00:09 UTC, Andy Valencia wrote:
On Friday, 10 May 2024 at 00:40:01 UTC, Meta wrote:
Yes. The reason for this is that it avoids having to
essentially do the same check twice. If `in` returned a bool
instead of a pointer, after checking for whether the element
exists
On Friday, 10 May 2024 at 00:40:01 UTC, Meta wrote:
Yes. The reason for this is that it avoids having to
essentially do the same check twice. If `in` returned a bool
instead of a pointer, after checking for whether the element
exists (which requires searching for the element in the
associative
On Friday, 10 May 2024 at 00:18:16 UTC, Andy Valencia wrote:
tst7.d(6): Error: cannot implicitly convert expression `e in
this.members` of type `bool*` to `bool`
tst7.d(15): Error: template instance `tst7.Foo!uint` error
instantiating
I'm getting this for this bit of source (trimmed from the
tst7.d(6): Error: cannot implicitly convert expression `e in
this.members` of type `bool*` to `bool`
tst7.d(15): Error: template instance `tst7.Foo!uint` error
instantiating
I'm getting this for this bit of source (trimmed from the bigger
code). I switched to this.members.get(e, false) and th
On Wednesday, 8 May 2024 at 10:24:07 UTC, Nick Treleaven wrote:
Named arguments are optional, so I don't see how they could
make Flag redundant.
Actually, an external tool could detect when a bool is passed as
an argument to a function and warn when not done with a named
argument. This would
On Thursday, 9 May 2024 at 13:40:56 UTC, cc wrote:
It's pointless mandatory verbosity. StopWatch ctor only takes
one boolean argument. It doesn't *need* to specify what it
relates to. You either already know, or you have to look it up
anyway. Flags made sense when you might get the order of
On Thursday, 9 May 2024 at 00:39:49 UTC, Liam McGillivray wrote:
What's a good way I can achieve what I'm trying to do, using
either reference counting or a garbage-collected object?
There is libraries like `automem`[1] that implements refcounting
and more.
Without showing your code for ref
On Wednesday, 8 May 2024 at 10:24:07 UTC, Nick Treleaven wrote:
On Wednesday, 8 May 2024 at 04:27:13 UTC, cc wrote:
It doesn't allow a simple boolean to be used as an argument,
or any other Flag as they are different instantiations of a
template rather than equivalent aliases.
It is however awf
Using lex/yacc I can do a more or less complex things in .yacc
semantic actions, such complex as bytecode compilation or real
CPU assembly.
Playing with `pegged`, I can't figure out how to move from
`ParseTree` to such like semantic actions. I even can't parse
numbers from strings in lexer-li