Re: Why are structs and classes so different?

2022-05-15 Thread Walter Bright via Digitalmars-d-learn
On 5/15/2022 8:26 AM, Kevin Bailey wrote: I'm trying to understand why it is this way. Great question. The difference, in a nutshell, is a struct is a value type, and a class is a reference type. This difference permeates every facet their behavior. In C++, a struct can designed to be a

Re: DConf 2017 Videos

2020-04-25 Thread Walter Bright via Digitalmars-d-learn
On 4/25/2020 4:11 AM, Jacob Carlborg wrote: I have previously downloaded the DConf videos. I sent them to Mike for him to upload. Thank you! You have certainly saved the day here!

Re: Overloads not returning appropriate info. [Field reflunkory]

2019-04-08 Thread Walter Bright via Digitalmars-d-learn
On 4/8/2019 7:39 AM, Alex wrote: My point is that you are going ape shit over using T.stringof, you posted no I mean, half the shit in __traits looks like it could be in std.traits and there Please tone down both the aggressiveness and the use of cuss words, and use professional demeanor.

Re: Address of data that is static, be it shared or tls or __gshared or immutable on o/s

2017-09-11 Thread Walter Bright via Digitalmars-d-learn
On 9/10/2017 2:38 PM, Cecil Ward wrote: Ali, I have worked on operating systems' development in r+d. My definitions of terms are hopefully the same as yours. If we refer to two threads, if they both belong to the same process, then they share a common address space, by my definition of the

Re: Variables with scoped destruction in closures

2016-10-16 Thread Walter Bright via Digitalmars-d-learn
On 10/14/2016 3:18 AM, Nordlöw wrote: t_scope.d(23,6): Error: variable t_scope.below.s has scoped destruction, cannot build closure https://github.com/dlang/dmd/blob/master/src/toir.d#L820 The problem is the closure is generated when it is expected that the delegate will survive past the

Re: Solution to "statement is not reachable" depending on template variables?

2016-03-31 Thread Walter Bright via Digitalmars-d-learn
On 3/16/2016 4:18 AM, Johan Engelen wrote: I've found discussions, but not an actual "recommended" solution for the problem of "statement is not reachable" warnings in templates with early returns, e.g.: ``` bool nobool(T...)() { foreach (i, U; T) { static if (is(U == bool)) {

Re: Porting from D1 to D2

2015-06-30 Thread Walter Bright via Digitalmars-d-learn
On 6/28/2015 2:48 AM, ponce wrote: I don't quite get what code could be generating that reference, since I don't call format or toString on a Throwable. You can grep the .obj files for the symbol.