Re: Why are class variables public, when marked by the 'private' keyword?

2020-03-20 Thread Kirill via Digitalmars-d-learn
On Saturday, 21 March 2020 at 04:58:32 UTC, Mike Parker wrote: In D, the unit of encapsulation is the module. So private means "private to the module", i.e., private members are accessible within the same module. If ID were in a different module from main, you would see an error. Indeed, I re

Re: Why are class variables public, when marked by the 'private' keyword?

2020-03-20 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 21 March 2020 at 04:45:29 UTC, Kirill wrote: I was playing around with visibility attributes in D. I created a class with private variables. Then I tried to access those variables through the class object. It compiled without any errors. However, ... Shouldn't the compiler output

Why are class variables public, when marked by the 'private' keyword?

2020-03-20 Thread Kirill via Digitalmars-d-learn
I was playing around with visibility attributes in D. I created a class with private variables. Then I tried to access those variables through the class object. It compiled without any errors. However, ... Shouldn't the compiler output an error for trying to access private members of a class?

Strip Unused Symbols Ldc + Windows

2020-03-20 Thread SrMordred via Digitalmars-d-learn
Someone knows how to strip unused symbols on final binary using ldc on windows ? i found this about this topic: https://forum.dlang.org/post/yvmnkvzgoxhcfavja...@forum.dlang.org that uses --gc-sections and --version-script but this options are not avaliable in windows lld-link

Re: OR in version conditional compilation

2020-03-20 Thread jxel via Digitalmars-d-learn
On Saturday, 21 March 2020 at 00:12:20 UTC, Jonathan M Davis wrote: On Friday, March 20, 2020 4:33:58 PM MDT jxel via Digitalmars-d-learn wrote: On Friday, 20 March 2020 at 21:03:55 UTC, Jonathan M Davis wrote: > On Wednesday, March 18, 2020 10:23:26 AM MDT IGotD- via > > Digitalmars-d-learn wr

Re: dub and -lowmem: does nothing

2020-03-20 Thread kinke via Digitalmars-d-learn
On Friday, 20 March 2020 at 23:37:52 UTC, Anonymouse wrote: 4. If I run dub with -v on the lowmem configuration and copy/paste *the same command it ran*, unmodified, I suddenly get the more expected ~1183 Mb used. [...] -lowmem is visibly present in the dmd command listed with -v, but it see

Re: OR in version conditional compilation

2020-03-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, March 20, 2020 4:33:58 PM MDT jxel via Digitalmars-d-learn wrote: > On Friday, 20 March 2020 at 21:03:55 UTC, Jonathan M Davis wrote: > > On Wednesday, March 18, 2020 10:23:26 AM MDT IGotD- via > > > > Digitalmars-d-learn wrote: > >> I have not seen any example where version has several

dub and -lowmem: does nothing

2020-03-20 Thread Anonymouse via Digitalmars-d-learn
Manjaro/Arch x86_64, dmd v2.091.0, dub 1.19.0. I have a project which dmd on Windows fails to compile, throwing an OutOfMemoryError[1]. Up until recently it could be worked around by using `--build-mode=singleFile`, but now that's no longer enough and errors out too (on AppVeyor). The obviou

Re: OR in version conditional compilation

2020-03-20 Thread jxel via Digitalmars-d-learn
On Friday, 20 March 2020 at 21:03:55 UTC, Jonathan M Davis wrote: On Wednesday, March 18, 2020 10:23:26 AM MDT IGotD- via Digitalmars-d-learn wrote: I have not seen any example where version has several OR matches. Example idiom: version(X86_64 || X86) { } else version(ARM || Thumb) { }...

Re: OR in version conditional compilation

2020-03-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, March 18, 2020 10:23:26 AM MDT IGotD- via Digitalmars-d-learn wrote: > I have not seen any example where version has several OR matches. > > Example idiom: > > version(X86_64 || X86) > { > > } > else version(ARM || Thumb) > { > > }... > > you get the idea. So is this possible at all

Re: need help to get member function const address

2020-03-20 Thread Calvin P via Digitalmars-d-learn
On Thursday, 19 March 2020 at 23:46:01 UTC, Boris Carvajal wrote: https://issues.dlang.org/show_bug.cgi?id=20687 https://github.com/dlang/dmd/pull/10946 Thanks very much for such a quick fix.