Re: I don't understand betterC

2023-09-01 Thread evilrat via Digitalmars-d-learn
On Saturday, 2 September 2023 at 03:27:51 UTC, confused wrote: So I guess my next question is why, exactly, classes *can*, in fact, be implemented in ``` betterC ```, but are not? IIRC you can have extern(C++) classes in betterC, the real issue is the plain extern(D) classes which has some ass

Re: I don't understand betterC

2023-09-01 Thread bachmeier via Digitalmars-d-learn
On Saturday, 2 September 2023 at 03:18:31 UTC, confused wrote: On Friday, 1 September 2023 at 13:31:37 UTC, bachmeier wrote: You can read the documentation for object.d [here](https://dlang.org/phobos/object.html). It's kind of important. I'm not sure which specific part of the documentation

Re: I don't understand betterC

2023-09-01 Thread confused via Digitalmars-d-learn
On Friday, 1 September 2023 at 13:45:05 UTC, evilrat wrote: It is shadowing default implicit "import object;", here a demonstration ```d // this example shows default implicit import of "object" module // compile this example: // ldc2 -c test.d // output: // tuple("object", "core", "main",

Re: I don't understand betterC

2023-09-01 Thread confused via Digitalmars-d-learn
On Saturday, 2 September 2023 at 01:05:39 UTC, ryuukk_ wrote: If you are looking for a better C you are not looking for classes You contradict yourself If you heard about betterC, then you heard about this: https://dlang.org/spec/betterc.html Read it again, and specially this part: https:

Re: I don't understand betterC

2023-09-01 Thread confused via Digitalmars-d-learn
On Friday, 1 September 2023 at 13:31:37 UTC, bachmeier wrote: You can read the documentation for object.d [here](https://dlang.org/phobos/object.html). It's kind of important. I'm not sure which specific part of the documentation was supposed to illuminate the exact nature of that error.

Re: I don't understand betterC

2023-09-01 Thread ryuukk_ via Digitalmars-d-learn
On Friday, 1 September 2023 at 13:17:08 UTC, confused wrote: On Friday, 1 September 2023 at 08:19:55 UTC, Richard (Rikki) Andrew Cattermole wrote: ``size_t`` is defined in ``object.d`` which is implicitly imported into all modules. If it cannot be found, one of three things is happening: 1) Y

Re: Keeping data from memory mapped files

2023-09-01 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Sep 01, 2023 at 03:53:42AM +, Alexibu via Digitalmars-d-learn wrote: > Why do I need to copy data out of memory mapped files to avoid seg faults. > This defeats the purpose of memory mapped files. > Shouldn't the GC be able to manage it if I keep a pointer into it. The GC does not mana

Re: I don't understand betterC

2023-09-01 Thread evilrat via Digitalmars-d-learn
On Friday, 1 September 2023 at 13:17:08 UTC, confused wrote: On Friday, 1 September 2023 at 08:19:55 UTC, Richard (Rikki) Andrew Cattermole wrote: ``size_t`` is defined in ``object.d`` which is implicitly imported into all modules. If it cannot be found, one of three things is happening: 1) Y

Re: I don't understand betterC

2023-09-01 Thread bachmeier via Digitalmars-d-learn
On Friday, 1 September 2023 at 13:17:08 UTC, confused wrote: On Friday, 1 September 2023 at 08:19:55 UTC, Richard (Rikki) Andrew Cattermole wrote: ``size_t`` is defined in ``object.d`` which is implicitly imported into all modules. If it cannot be found, one of three things is happening: 1) Y

Re: I don't understand betterC

2023-09-01 Thread confused via Digitalmars-d-learn
On Friday, 1 September 2023 at 08:19:55 UTC, Richard (Rikki) Andrew Cattermole wrote: ``size_t`` is defined in ``object.d`` which is implicitly imported into all modules. If it cannot be found, one of three things is happening: 1) You have messed with some cli args related to picking druntime

Re: I don't understand betterC

2023-09-01 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
``size_t`` is defined in ``object.d`` which is implicitly imported into all modules. If it cannot be found, one of three things is happening: 1) You have messed with some cli args related to picking druntime/phobos 2) You have defined a module called object. 3) You have a broken compiler instal