Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread via Digitalmars-d-learn
On Thursday, 24 November 2022 at 05:41:11 UTC, Mike Parker wrote: On Thursday, 24 November 2022 at 03:49:16 UTC, []() {}() wrote: I broke a forum rule by critically analysing your blog? Wow. Criticize my blog posts all you want. Just stop please stop derailing threads. I'm going to delete

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 24 November 2022 at 03:49:16 UTC, []() {}() wrote: I broke a forum rule by critically analysing your blog? Wow. Criticize my blog posts all you want. Just stop please stop derailing threads. I'm going to delete further off topic posts in this thread.

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread thebluepandabear via Digitalmars-d-learn
've modified the code since then so that `private` isn't used, etc. Also thanks for that code improvement that you did, quite nice.

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread thebluepandabear via Digitalmars-d-learn
On Wednesday, 23 November 2022 at 13:52:18 UTC, ryuukk_ wrote: On Thursday, 17 November 2022 at 04:39:35 UTC, thebluepandabear wrote: I am creating a TUI library and I have a class with the following constant fields: ``` class Label : Renderable { const string text; const

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread thebluepandabear via Digitalmars-d-learn
I broke a forum rule by critically analysing your blog? Wow. Erm... You went off topic.

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread via Digitalmars-d-learn
On Thursday, 24 November 2022 at 02:00:15 UTC, Mike Parker wrote: On Wednesday, 23 November 2022 at 23:35:59 UTC, thebluepandabear wrote: Please stop, we get it... I'm not a moderator so I cannot enforce rules but there is NO need to continue this debate here. This software 'religiousness'

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 23 November 2022 at 23:35:59 UTC, thebluepandabear wrote: Please stop, we get it... I'm not a moderator so I cannot enforce rules but there is NO need to continue this debate here. This software 'religiousness' is too much. I am a moderator and I can enforce the rules. So

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread thebluepandabear via Digitalmars-d-learn
That the D module dissolves that perimeters of my types - in relation to other code in the same module, is a really odd design decision that I cannot, as yet, get my head around. That is, I can see no possible way in which this design decision can enhance my coding, even after having given if

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread surlymoor via Digitalmars-d-learn
On Wednesday, 23 November 2022 at 13:24:37 UTC, Tejas wrote: Please let's not repeat previous topics `private` will be enforced at module scope, for better or for worse, there has already been a [1000 post thread](https://forum.dlang.org/post/lqlllioynzfmpaozw...@forum.dlang.org) that

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread via Digitalmars-d-learn
On Wednesday, 23 November 2022 at 22:43:54 UTC, []() {}() wrote: My last post ;-) It seems far too many people conflate classes and oop. You can do oop without classes (whether you would want to is another question all together). You can also use class-types without doing oop. A

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread via Digitalmars-d-learn
On Wednesday, 23 November 2022 at 13:24:37 UTC, Tejas wrote: On Wednesday, 23 November 2022 at 11:06:12 UTC, []() {}() wrote: On Wednesday, 23 November 2022 at 09:51:46 UTC, FeepingCreature wrote: Why then should a programming language insist that all other code in the module should be

Re: Can we ease WASM in D ?

2022-11-23 Thread Hipreme via Digitalmars-d-learn
On Wednesday, 16 November 2022 at 22:51:31 UTC, bioinfornatics wrote: Dear community, I look some day ago to the D wasm page: -> https://wiki.dlang.org/Generating_WebAssembly_with_LDC And since then I ask myself can we at compile time convert a D code to an extern C code for wasm ? Indeed,

Re: Can we ease WASM in D ?

2022-11-23 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 16 November 2022 at 22:51:31 UTC, bioinfornatics wrote: Dear community, I look some day ago to the D wasm page: -> https://wiki.dlang.org/Generating_WebAssembly_with_LDC And since then I ask myself can we at compile time convert a D code to an extern C code for wasm ? Thanks

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread ryuukk_ via Digitalmars-d-learn
On Thursday, 17 November 2022 at 04:39:35 UTC, thebluepandabear wrote: I am creating a TUI library and I have a class with the following constant fields: ``` class Label : Renderable { const string text; const TextAlignment textAlignment; const Color color; this(Dimensions

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread Tejas via Digitalmars-d-learn
On Wednesday, 23 November 2022 at 11:06:12 UTC, []() {}() wrote: On Wednesday, 23 November 2022 at 09:51:46 UTC, FeepingCreature wrote: Why then should a programming language insist that all other code in the module should be able to bypass my specification, and do as it pleases to my

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread via Digitalmars-d-learn
On Wednesday, 23 November 2022 at 09:51:46 UTC, FeepingCreature wrote: The module is the capsule. D is simply not interested in building a capsule around a class. D does not let "anyone" pass through, it lets "anyone in the module" pass through, because the module is the wall. I think this

Re: Is defining get/set methods for every field overkill?

2022-11-23 Thread FeepingCreature via Digitalmars-d-learn
On Tuesday, 22 November 2022 at 21:45:29 UTC, []() {}() wrote: On Tuesday, 22 November 2022 at 21:00:58 UTC, []() {}() wrote: "Being able to declare a “friend” that is somewhere in some other file runs against notions of encapsulation." (This is the motivation for that article it seems).

Proper way to override (swap) runtime and phobos. [feature request?]

2022-11-23 Thread AnimusPEXUS via Digitalmars-d-learn
for development purposes. is there are correct way to somehow (partially or complete) override druntime and phobos? or, maybe, some code injection/patching mechanisms during compilation of own code.