On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a struct
On 6/17/20 4:46 PM, Denis wrote:> Is there a cleaner way to implement an
"if not" condition check?
>if ( configfile.isFile && configfile.extension == ".conf", message
) { }
>else
if (isConfigFile(name)) {
// ...
} else {
// ...
}
The following is suitable in many case
On Thursday, 11 June 2020 at 06:13:59 UTC, adnan338 wrote:
On Thursday, 11 June 2020 at 06:05:09 UTC, adnan338 wrote:
I would like to set a callback for the `download()` function
but I do not seem to find a way to add a callback to the
procedure.
[...]
I have also been told that Gtk is not
On Thursday, 18 June 2020 at 00:43:40 UTC, Stanislav Blinov wrote:
if( ! (configfile.isFile && configfile.extension == ".conf") )
?
That does indeed clean up the compound logic. One is still left
with:
if( !(
if( !
if( !(
if( !
:
I was hoping to get away from all the `not`s too
On Wednesday, 17 June 2020 at 23:46:54 UTC, Denis wrote:
`if` is not a good substitute, because it works in the opposite
sense, often requiring lots of `not`s. As a trivial example:
assert( configfile.isFile && configfile.extension == ".conf" )
-vs-
if ( !configfile.isFile || configfile
Is there a cleaner way to implement an "if not" condition check?
WHY NOT JUST USE "IF"?
For data validation, code is cleaner and more intelligible if the
condition being checked is written in an affirmative sense; that
is, in the same way that `assert` is written. This is especially
true when
On Wed, Jun 17, 2020 at 02:32:09PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Wednesday, 17 June 2020 at 14:24:01 UTC, Stefan Koch wrote:
> > Parser in dmd does even inherit from Lexer.
>
> why would a parser ever inherit from a lexer?
Because, unlike a regular parser-driven compil
On Wednesday, 17 June 2020 at 14:24:01 UTC, Stefan Koch wrote:
Parser in dmd does even inherit from Lexer.
why would a parser ever inherit from a lexer?
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a struct
On Wed, Jun 17, 2020 at 11:50:27AM +, Per Nordlöw via Digitalmars-d-learn
wrote:
> Should a range-compliant aggregate type realizing a parser be encoded
> as a struct or class?
Preferably a struct IMO, but see below.
> In dmd `Lexer` and `Parser` are both classes.
Probably for historical r
On Wednesday, 17 June 2020 at 12:12:24 UTC, Per Nordlöw wrote:
On Tuesday, 16 June 2020 at 12:21:26 UTC, Per Nordlöw wrote:
when
dub test
doesn't?
I'm trying to reduce it through
dustmite phobos-next "dub test 2>&1 | grep -F
'_D6object10_xopEqualsFMxPvMxQeZb'"
Is this the best wa
On Wednesday, 17 June 2020 at 12:39:11 UTC, FeepingCreature wrote:
On Wednesday, 17 June 2020 at 12:30:24 UTC, Quantium wrote:
Hi all! I have a programm in D (The simplest OS), which should
be compiled into .bin or .iso format to be possible to run it
on VirtualBox. How can I compile it to .bin
On Wednesday, 17 June 2020 at 12:30:24 UTC, Quantium wrote:
Hi all! I have a programm in D (The simplest OS), which should
be compiled into .bin or .iso format to be possible to run it
on VirtualBox. How can I compile it to .bin / .iso format and
which compiler should I use?
Try this page? ht
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a struct
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a struct
Hi all! I have a programm in D (The simplest OS), which should be
compiled into .bin or .iso format to be possible to run it on
VirtualBox. How can I compile it to .bin / .iso format and which
compiler should I use?
On Tuesday, 16 June 2020 at 12:21:26 UTC, Per Nordlöw wrote:
when
dub test
doesn't?
I'm trying to reduce it through
dustmite phobos-next "dub test 2>&1 | grep -F
'_D6object10_xopEqualsFMxPvMxQeZb'"
Is this the best way to use dustmite in this case?
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a struct or class?
On Tuesday, 16 June 2020 at 12:21:26 UTC, Per Nordlöw wrote:
All the linker errors originate from zio.d but zio.d has its
unittests disabled so how come this fails to link?
zio.d is not the source of the problem. Something else is.
The common denominator seems to be that the builtins xopEqual
19 matches
Mail list logo