Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread Ali Çehreli via Digitalmars-d-learn
On 08/28/2014 09:37 PM, Andrew Godfrey wrote: > On Friday, 29 August 2014 at 02:10:46 UTC, H. S. Teoh via > Digitalmars-d-learn wrote: >> In D you just use '.' throughout and it Just > Works(tm). > > Unless the property you're accessing is also a pointer property, like > sizeof. Then you have to

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Aug 29, 2014 at 05:28:12AM +, Andrew Godfrey via Digitalmars-d-learn wrote: > On Friday, 29 August 2014 at 05:05:55 UTC, H. S. Teoh via > Digitalmars-d-learn wrote: > >On Fri, Aug 29, 2014 at 04:37:37AM +, Andrew Godfrey via > >Digitalmars-d-learn wrote: > >>Unless the property you

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread Andrew Godfrey via Digitalmars-d-learn
On Friday, 29 August 2014 at 05:05:55 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Fri, Aug 29, 2014 at 04:37:37AM +, Andrew Godfrey via Digitalmars-d-learn wrote: Unless the property you're accessing is also a pointer property, like sizeof. Then you have to be careful. True. Though

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Aug 29, 2014 at 04:37:37AM +, Andrew Godfrey via Digitalmars-d-learn wrote: > On Friday, 29 August 2014 at 02:10:46 UTC, H. S. Teoh via > Digitalmars-d-learn wrote: > >In D you just use '.' throughout and it Just Works(tm). > > Unless the property you're accessing is also a pointer pr

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread Andrew Godfrey via Digitalmars-d-learn
On Friday, 29 August 2014 at 02:10:46 UTC, H. S. Teoh via Digitalmars-d-learn wrote: In D you just use '.' throughout and it Just > Works(tm). Unless the property you're accessing is also a pointer property, like sizeof. Then you have to be careful. The below prints 4 then 8 (on 32-bit): un

Re: C++ namespaces

2014-08-28 Thread Dicebot via Digitalmars-d-learn
On Friday, 29 August 2014 at 02:10:56 UTC, Vasileios Anagnostopoulos via Digitalmars-d-learn wrote: Hi, in the 2.066 changelog I saw something for supporting c++ namespaces. I thought this was not possible. Which implementation does this refer? (compiler/architecture) thank you very much.

Re: Building library

2014-08-28 Thread anonymous via Digitalmars-d-learn
On Thursday, 28 August 2014 at 19:29:40 UTC, papaboo wrote: My current file and module layout is test.d src/math/vector.d - module dragonfly.math.vector src/math/quaternion.d - module dragonfly.math.quaternion Compiling with $ dmd test.d src/math/vector.d src/math/quaternion.d && ./test works pe

Re: Building library

2014-08-28 Thread Cassio Butrico via Digitalmars-d-learn
On Thursday, 28 August 2014 at 19:29:40 UTC, papaboo wrote: Hey I've just started getting into D and so far I'm just messing around with it in a small math library. However I've run into an issue while trying to build a library and linking it with my main file. My current file and module layout

Building library

2014-08-28 Thread papaboo via Digitalmars-d-learn
Hey I've just started getting into D and so far I'm just messing around with it in a small math library. However I've run into an issue while trying to build a library and linking it with my main file. My current file and module layout is test.d src/math/vector.d - module dragonfly.math.vector s

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Daniel Murphy via Digitalmars-d-learn
"Jonathan M Davis" wrote in message news:xjmfhegvanqdivhbt...@forum.dlang.org... AFAIK, the only reason that it's not deprecated is that no one has bothered to make the change (and you didn't want to deprecate it when you went through all of those and updated their status a while back). Andr

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, 28 August 2014 at 15:01:58 UTC, Daniel Murphy wrote: "Brian Schott" wrote in message news:pbfgiwaxsdxdxetpi...@forum.dlang.org... The "delete" keyword is deprecated[1] and making that decision never broke any code. [1] http://dlang.org/deprecate.html#delete If you look at the

Re: Is this a bug when creating proxies in classes?

2014-08-28 Thread Gary Willoughby via Digitalmars-d-learn
On Thursday, 28 August 2014 at 16:23:48 UTC, anonymous wrote: On Tuesday, 26 August 2014 at 18:13:52 UTC, Gary Willoughby wrote: With that in mind what is strange is that if in my example you change the class for a struct everything works as expected. Why is that? That's because when not mixe

Re: Is this a bug when creating proxies in classes?

2014-08-28 Thread anonymous via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 18:13:52 UTC, Gary Willoughby wrote: With that in mind what is strange is that if in my example you change the class for a struct everything works as expected. Why is that? That's because when not mixed into a class, Proxy did import std.traits: static if (!

Re: Is this a bug when creating proxies in classes?

2014-08-28 Thread Gary Willoughby via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 20:41:47 UTC, Marc Schütz wrote: On Tuesday, 26 August 2014 at 18:13:52 UTC, Gary Willoughby wrote: With that in mind what is strange is that if in my example you change the class for a struct everything works as expected. Why is that? This is bizarre... I tried

Re: "Error 42: Symbol Undefined" for asserts

2014-08-28 Thread bonzaster via Digitalmars-d-learn
Hi! If it is still actual: you can try to add dependent project by checking it on Project depencies tab of project options http://savepic.ru/5721500.png It helps in my case.

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Daniel Murphy via Digitalmars-d-learn
"Brian Schott" wrote in message news:pbfgiwaxsdxdxetpi...@forum.dlang.org... The "delete" keyword is deprecated[1] and making that decision never broke any code. [1] http://dlang.org/deprecate.html#delete If you look at the table up the top, delete hasn't actually been deprecated yet. If

Re: [vibe.d] Reference to std/metastrings.d

2014-08-28 Thread Chris via Digitalmars-d-learn
On Thursday, 28 August 2014 at 13:21:57 UTC, Dicebot wrote: On Thursday, 28 August 2014 at 13:19:42 UTC, Chris wrote: dmd v2.066: templ/parsetools.d has a reference to std/metastrings.d which no longer exists there. Fixed in vibe.d master afaik, you need to wait for new release or use master.

Re: [vibe.d] Reference to std/metastrings.d

2014-08-28 Thread Dicebot via Digitalmars-d-learn
On Thursday, 28 August 2014 at 13:19:42 UTC, Chris wrote: dmd v2.066: templ/parsetools.d has a reference to std/metastrings.d which no longer exists there. Fixed in vibe.d master afaik, you need to wait for new release or use master.

[vibe.d] Reference to std/metastrings.d

2014-08-28 Thread Chris via Digitalmars-d-learn
dmd v2.066: templ/parsetools.d has a reference to std/metastrings.d which no longer exists there.

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread ketmar via Digitalmars-d-learn
On Thu, 28 Aug 2014 11:50:48 + Aerolite via Digitalmars-d-learn wrote: > So no chance even of this? already done: https://issues.dlang.org/show_bug.cgi?id=13388 signature.asc Description: PGP signature

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Aerolite via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 20:17:11 UTC, Brian Schott wrote: It would be nice if we could at least allow both "nothrow" and "@nothrow". Because "nothrow" is already a keyword there's no possibility of a UDA overriding it. This would at least give people the option of making their code look

Re: Issue with dmd 2.066, alias this, and sort

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
On Thursday, 28 August 2014 at 10:54:47 UTC, monarch_dodra wrote: Phobos issue: http://forum.dlang.org/thread/uignsankcumgmhwpo...@forum.dlang.org#post-uignsankcumgmhwpoead:40forum.dlang.org https://github.com/D-Programming-Language/phobos/pull/2472

Re: How to cast to "void*", while bypassing alias this or opCast

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
On Thursday, 28 August 2014 at 11:02:03 UTC, anonymous wrote: On Thursday, 28 August 2014 at 10:45:52 UTC, monarch_dodra wrote: I'm investigating a phobos regression. From "doesPointTo": // static if (isPointer!S || is(S == class) || is(S == interface)) { const m = cast(void*

Re: How to cast to "void*", while bypassing alias this or opCast

2014-08-28 Thread anonymous via Digitalmars-d-learn
On Thursday, 28 August 2014 at 10:45:52 UTC, monarch_dodra wrote: I'm investigating a phobos regression. From "doesPointTo": // static if (isPointer!S || is(S == class) || is(S == interface)) { const m = cast(void*) source; // Basically, given a "pointer like" structur

Re: Issue with dmd 2.066, alias this, and sort

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
On Thursday, 28 August 2014 at 10:38:12 UTC, monarch_dodra wrote: On Wednesday, 27 August 2014 at 21:43:40 UTC, bearophile wrote: rcor: It compiles if you use: @property auto feature() const pure nothrow { return _feature; } Otherwise I get strange errors like: ...\dmd2\src\phobos\std\exce

How to cast to "void*", while bypassing alias this or opCast

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
I'm investigating a phobos regression. From "doesPointTo": // static if (isPointer!S || is(S == class) || is(S == interface)) { const m = cast(void*) source; // Basically, given a "pointer like" structure, I want the void* equivalent. I really don't care about how "S"

Re: Issue with dmd 2.066, alias this, and sort

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 21:43:40 UTC, bearophile wrote: rcor: I've tried to express my problem in a mostly minimal example here: https://gist.github.com/murphyslaw480/d4a5f857a104bcf62de1 The class Point has an alias this to its own property 'feature()', which returns a reference to

Re: sdlang-d can not link after updating to dmd 2.066

2014-08-28 Thread Puming via Digitalmars-d-learn
I updated dub to 0.9.22 and still got the same error... THis is the output of `dub build --force`: --- output --- ## Warning for package sdlang-d ## The following compiler flags have been specified in the package description file. They are handled by DUB and direct use in packages is discour

Re: Learning D the GTK+ way [was Learning D]

2014-08-28 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2014-08-27 at 13:25 +, Ryan via Digitalmars-d-learn wrote: […] > I'm thinking I will probably create a more in depth GTK+ hello > world that attempts to covers some of the current D landscape. Exactly what I am doing :-) > For instance I now understand how DMD and RDMD work and how

C++ namespaces

2014-08-28 Thread Vasileios Anagnostopoulos via Digitalmars-d-learn
Hi, in the 2.066 changelog I saw something for supporting c++ namespaces. I thought this was not possible. Which implementation does this refer? (compiler/architecture) thank you very much. -- Dr. Vasileios Anagnostopoulos (MSc,PhD) Researcher/Developer ICCS/NTUA 9 Heroon Polytechneiou Str.,

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread ketmar via Digitalmars-d-learn
On Wed, 27 Aug 2014 20:17:10 + Brian Schott via Digitalmars-d-learn wrote: > It would be nice if we could at least allow both "nothrow" and > "@nothrow". here it is, another useless patch: https://issues.dlang.org/show_bug.cgi?id=13388 i'm sure that it will never be accepted in mainline, so