Re: WTF! new in class is static?!?!

2018-06-10 Thread Bauss via Digitalmars-d-learn
On Sunday, 10 June 2018 at 02:34:11 UTC, KingJoffrey wrote: On Sunday, 10 June 2018 at 01:27:50 UTC, bauss wrote: On Saturday, 9 June 2018 at 12:40:07 UTC, RealProgrammer wrote: maybe you and others in the D 'community' should start paying attention to the 'opinions' of those who do

Re: WTF! new in class is static?!?!

2018-06-09 Thread KingJoffrey via Digitalmars-d-learn
On Sunday, 10 June 2018 at 01:27:50 UTC, bauss wrote: On Saturday, 9 June 2018 at 12:40:07 UTC, RealProgrammer wrote: maybe you and others in the D 'community' should start paying attention to the 'opinions' of those who do professional development with professional compilers. I do

Re: WTF! new in class is static?!?!

2018-06-09 Thread bauss via Digitalmars-d-learn
On Saturday, 9 June 2018 at 12:40:07 UTC, RealProgrammer wrote: maybe you and others in the D 'community' should start paying attention to the 'opinions' of those who do professional development with professional compilers. I do professional work with a professional compiler aka. The D

Re: WTF! new in class is static?!?!

2018-06-09 Thread aliak00 via Digitalmars-d-learn
On Friday, 8 June 2018 at 18:18:27 UTC, Jonathan M Davis wrote: On Thursday, June 07, 2018 22:43:50 aliak via Digitalmars-d-learn wrote: On Thursday, 7 June 2018 at 21:32:54 UTC, Jonathan M Davis wrote: > [...] Is that supposed to compile? -> https://run.dlang.io/is/SjUEOu Error: cannot use

Re: WTF! new in class is static?!?!

2018-06-09 Thread 12345swordy via Digitalmars-d-learn
On Saturday, 9 June 2018 at 13:49:48 UTC, 12345swordy wrote: No, because you been caught making imposter accounts left and right. Which btw we can tell as your poor attempts to imposter me. Well... why ya all r busy havin a go at me, the bugs remains (as do all D'other bugs).

Re: WTF! new in class is static?!?!

2018-06-09 Thread 12345swordy via Digitalmars-d-learn
On Saturday, 9 June 2018 at 13:24:49 UTC, KingJoffrey wrote: On Saturday, 9 June 2018 at 12:56:55 UTC, rikki cattermole wrote: But unlike you "king", Bauss isn't using tor to ban evade. why you wanna ban little old me? is it cause I made a crticism of D? No, because you been caught making

Re: WTF! new in class is static?!?!

2018-06-09 Thread KingJoffrey via Digitalmars-d-learn
On Saturday, 9 June 2018 at 12:56:55 UTC, rikki cattermole wrote: But unlike you "king", Bauss isn't using tor to ban evade. why you wanna ban little old me? is it cause I made a crticism of D? did i hurt your feelings? ..and everyone I know uses tor - and you should too - whether you're

Re: WTF! new in class is static?!?!

2018-06-09 Thread rikki cattermole via Digitalmars-d-learn
But unlike you "king", Bauss isn't using tor to ban evade.

Re: WTF! new in class is static?!?!

2018-06-09 Thread RealProgrammer via Digitalmars-d-learn
On Saturday, 9 June 2018 at 11:47:54 UTC, bauss wrote: Nobody cares about your opinion. Nobody is forcing you to write code like that. In fact most programs will be written without such code, for good reason. Regardless if it does the "correct" thing or not. Dude. That response is so

Re: WTF! new in class is static?!?!

2018-06-09 Thread bauss via Digitalmars-d-learn
On Saturday, 9 June 2018 at 09:24:48 UTC, KingJoffrey wrote: On Thursday, 7 June 2018 at 21:57:17 UTC, Steven Schveighoffer wrote: Yep, long-standing issue: https://issues.dlang.org/show_bug.cgi?id=2947 Almost a decade old! -Steve Another reason why I still refuse to bring my code to D.

Re: WTF! new in class is static?!?!

2018-06-09 Thread KingJoffrey via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:57:17 UTC, Steven Schveighoffer wrote: Yep, long-standing issue: https://issues.dlang.org/show_bug.cgi?id=2947 Almost a decade old! -Steve Another reason why I still refuse to bring my code to D. As if the module not respecting class encapsulation was not

Re: WTF! new in class is static?!?!

2018-06-08 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, June 07, 2018 22:43:50 aliak via Digitalmars-d-learn wrote: > On Thursday, 7 June 2018 at 21:32:54 UTC, Jonathan M Davis wrote: > > struct S > > { > > > > int* ptr = new int(42); > > > > } > > Is that supposed to compile? -> https://run.dlang.io/is/SjUEOu > > Error: cannot use

Re: WTF! new in class is static?!?!

2018-06-07 Thread DigitalDesigns via Digitalmars-d-learn
On Thursday, 7 June 2018 at 23:08:22 UTC, Steven Schveighoffer wrote: On 6/7/18 6:58 PM, DigitalDesigns wrote: On Thursday, 7 June 2018 at 21:57:17 UTC, Steven Schveighoffer wrote: On 6/7/18 5:07 PM, DigitalDesigns wrote: class A; class B {     A a = new A(); } auto b1 = new B(); auto b2 =

Re: WTF! new in class is static?!?!

2018-06-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/7/18 6:58 PM, DigitalDesigns wrote: On Thursday, 7 June 2018 at 21:57:17 UTC, Steven Schveighoffer wrote: On 6/7/18 5:07 PM, DigitalDesigns wrote: class A; class B {     A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! Yep, long-standing issue:

Re: WTF! new in class is static?!?!

2018-06-07 Thread DigitalDesigns via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:57:17 UTC, Steven Schveighoffer wrote: On 6/7/18 5:07 PM, DigitalDesigns wrote: class A; class B {    A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! Yep, long-standing issue: https://issues.dlang.org/show_bug.cgi?id=2947

Re: WTF! new in class is static?!?!

2018-06-07 Thread aliak via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:32:54 UTC, Jonathan M Davis wrote: struct S { int* ptr = new int(42); } Is that supposed to compile? -> https://run.dlang.io/is/SjUEOu Error: cannot use non-constant CTFE pointer in an initializer &[42][0]

Re: WTF! new in class is static?!?!

2018-06-07 Thread ag0aep6g via Digitalmars-d-learn
On 06/07/2018 11:26 PM, Ethan wrote: The spec isn't clear on this but it uses the same rules as struct field initialisation, ie it's defined once and copied to each instance on creation. https://dlang.org/spec/struct.html#default_struct_init It says there that "The default initializers may

Re: WTF! new in class is static?!?!

2018-06-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/7/18 5:07 PM, DigitalDesigns wrote: class A; class B {    A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! Yep, long-standing issue: https://issues.dlang.org/show_bug.cgi?id=2947 Almost a decade old! -Steve

Re: WTF! new in class is static?!?!

2018-06-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:07:26 UTC, DigitalDesigns wrote: I'm glad I finally found this out! This is not typical behavior in most languages is it? I don't think most languages allow this, and D used to not allow it either, but then CTFE got class support and it got enabled. If you

Re: WTF! new in class is static?!?!

2018-06-07 Thread Cym13 via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:07:26 UTC, DigitalDesigns wrote: class A; class B { A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! I'm glad I finally found this out! This is not typical behavior in most languages is it? I'd expect it to be translated to

Re: WTF! new in class is static?!?!

2018-06-07 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:07:26 UTC, DigitalDesigns wrote: class A; class B { A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! I'm glad I finally found this out! This is not typical behavior in most languages is it? I'd expect it to be translated to

Re: WTF! new in class is static?!?!

2018-06-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, June 07, 2018 21:07:26 DigitalDesigns via Digitalmars-d-learn wrote: > class A; > > class B > { > A a = new A(); > } > > auto b1 = new B(); > auto b2 = new B(); > > assert(b1.a == b2.a)!! > > > I'm glad I finally found this out! This is not typical behavior > in most languages is

Re: WTF! new in class is static?!?!

2018-06-07 Thread Ethan via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:07:26 UTC, DigitalDesigns wrote: assert(b1.a == b2.a)!! The spec isn't clear on this but it uses the same rules as struct field initialisation, ie it's defined once and copied to each instance on creation.

WTF! new in class is static?!?!

2018-06-07 Thread DigitalDesigns via Digitalmars-d-learn
class A; class B { A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! I'm glad I finally found this out! This is not typical behavior in most languages is it? I'd expect it to be translated to something like class B { A a; this() { a = new