Re: Acess variable that was set by thread

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Monday, 8 August 2022 at 01:36:45 UTC, vc wrote: Hello, i have the following code, the flora contains a boolean zeus in the DerivedThread the boolean zeus was set to true; but when i'm trying to access it outside the thread in main it returns me false; any thoughts ? import flora; class

Re: Verbosity in D

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Monday, 8 August 2022 at 00:15:48 UTC, pascal111 wrote: On Sunday, 7 August 2022 at 23:44:26 UTC, Emanuele Torre wrote: On Sunday, 7 August 2022 at 23:31:45 UTC, pascal111 wrote: On Sunday, 7 August 2022 at 22:16:55 UTC, Emanuele Torre wrote: [...] It seems complex, I didn't get it yet,

Re: Verbosity in D

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Monday, 8 August 2022 at 00:11:33 UTC, pascal111 wrote: On Sunday, 7 August 2022 at 23:53:36 UTC, Emanuele Torre wrote: On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote: It's clear by working with D that it has the same bad point like Pascal language; the "verbosity". Is there any

Re: Supporting Arabic in GUI

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Sunday, 7 August 2022 at 23:48:22 UTC, pascal111 wrote: I have no idea about GUI or Rad programming in D; it's not its time, but I'm curious to know if D is fine supporting for Arabic language in the GUI applications or we will have some issues like I met - in my experience - in Free

Re: Verbosity in D

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote: It's clear by working with D that it has the same bad point like Pascal language; the "verbosity". Is there any plans in future to make some shorthanded techniques that clean verbosity from D? Quote: "In terms of functionality,

Re: Verbosity in D

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Sunday, 7 August 2022 at 23:44:26 UTC, Emanuele Torre wrote: int[] arr = { 10, 12, 14 }; Oops, this is C++, not D: `int arr[] = { 10, 12, 14 };` =)

Re: Verbosity in D

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Sunday, 7 August 2022 at 23:31:45 UTC, pascal111 wrote: On Sunday, 7 August 2022 at 22:16:55 UTC, Emanuele Torre wrote: On Sunday, 7 August 2022 at 20:15:05 UTC, pascal111 wrote: What destructuring binds? I didn't hear about that before. ```C++ #include struct Point { int x, y; };

Re: Verbosity in D

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Sunday, 7 August 2022 at 20:15:05 UTC, pascal111 wrote: What destructuring binds? I didn't hear about that before. ```C++ #include struct Point { int x, y; }; Point add_points(const Point& a, const Point& b) { return { a.x + b.x, a.y + b.y }; } int main() { const auto [x, y]

Re: Ranges

2022-08-07 Thread Emanuele Torre via Digitalmars-d-learn
On Saturday, 6 August 2022 at 15:37:32 UTC, pascal111 wrote: On Friday, 5 August 2022 at 04:05:08 UTC, Salih Dincer wrote: On Thursday, 4 August 2022 at 22:54:42 UTC, pascal111 wrote: I didn't notice that all what we needs to pop a range forward is just a slice, yes, we don't need variable

Re: "chain" vs "~"

2022-08-06 Thread Emanuele Torre via Digitalmars-d-learn
On Sunday, 7 August 2022 at 01:22:18 UTC, pascal111 wrote: Why we use "chain" while we have "~": '''D int[] x=[1,2,3]; int[] y=[4,5,6]; auto z=chain(x,y); auto j=x~y; ''' They are quite different: * `chain` gives you "range" (iterator) that starts from the first element of `x` and ends at