On Sunday, 11 December 2022 at 17:45:20 UTC, ryuukk_ wrote:
Why is it called ``DList`` and not just ``List``, i have no clue
Probably because it is a *D*ouble-linked List :-)
Hi,
I'm writing a DLang parser and got confused of this.
What is a good way to distinguish lambda functions and structure
initialization blocks.
Both of them are {} blocks.
I'm thinking of something like this:
1. checking inside (on the first hierarchy level inside {})
, => must be a
On Monday, 12 December 2022 at 01:28:42 UTC, Adam D Ruppe wrote:
On Monday, 12 December 2022 at 01:19:23 UTC, jni wrote:
The boilerplate is easy but Then the other part is a
problem for me is the necessary other Java classes. They are
not part of the NDK so the only way to load the jar is
On Monday, 12 December 2022 at 11:17:47 UTC, jni wrote:
It's good. But you did the java bindings by hand or is there a
generator in arsd.jni for that too?
It does it automatically. You compile jni.d with
`-version=WithClassLoadSupport` and then write a main function
that calls
On Monday, 12 December 2022 at 08:54:33 UTC, realhet wrote:
1. checking inside (on the first hierarchy level inside {})
, => must be a struct initializer
; => must be a lambda
no , and no ; => check it from the outside
Some statements don't end in a semicolon, so you would also
On 12/12/22 3:54 AM, realhet wrote:
Hi,
I'm writing a DLang parser and got confused of this.
What is a good way to distinguish lambda functions and structure
initialization blocks.
Both of them are {} blocks.
I'm thinking of something like this:
1. checking inside (on the first hierarchy
```
int[string] aa = ["ok":1, "aaa":2, "ccc":3, "ddd":4];
foreach (k ; aa.byKey)
{
if (k == "aaa") {
aa.remove(k);
aa["ww"] = 33;
}
if (k == "ww") {
aa.remove(k);
On Sunday, 11 December 2022 at 17:45:20 UTC, ryuukk_ wrote:
There is: https://dlang.org/phobos/std_container_dlist.html
Why is it called ``DList`` and not just ``List``, i have no clue
The D is to indicate that it is a doubly-linked list. It
maintains a forward and backward pointer chain to
On 12/12/22 12:23 PM, lili wrote:
```
int[string] aa = ["ok":1, "aaa":2, "ccc":3, "ddd":4];
foreach (k ; aa.byKey)
{
if (k == "aaa") {
aa.remove(k);
aa["ww"] = 33;
}
if (k == "ww") {
aa.remove(k);
aa["vv"] = 33;
}
On Monday, 12 December 2022 at 04:49:09 UTC, Siarhei Siamashka
wrote:
On Sunday, 11 December 2022 at 06:50:44 UTC, Joel wrote:
I've been trying to fill in areas with a colour but can't work
it out. I want something like the effect where it fills with
diamonds. Not all at once but building up
is foreach Syntactic sugar?, like for-range in C++, if it is,
compiler how implement
On 12/12/22 7:54 PM, lili wrote:
is foreach Syntactic sugar?, like for-range in C++, if it is, compiler
how implement
Yes it is syntax sugar. The lowering depends on what the item you're
iterating is.
For an associative array `byKey`, it is converting the AA into a range
of keys, and
On 12/12/22 8:45 PM, Steven Schveighoffer wrote:
for(auto r = aa.byKey, auto k = r.front; !r.empty; r.popFront)
err... forgot the continual front assignment
I think it's more like:
for(auto r = aa.byKey; !r.empty; r.popFront) {
auto k = r.front;
// foreach body
}
-Steve
13 matches
Mail list logo