Re: Compile time vs run time -- what is the difference?

2022-12-31 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Jan 01, 2023 at 02:18:23AM +, Salih Dincer via Digitalmars-d-learn wrote: > On Sunday, 1 January 2023 at 01:20:02 UTC, Ali Çehreli wrote: > > On 12/31/22 16:42, H. S. Teoh wrote: > > > > - runtime: The D runtime. > > Sometimes I see runtime facilities used as compile time and I'm

Re: Compile time vs run time -- what is the difference?

2022-12-31 Thread Salih Dincer via Digitalmars-d-learn
On Sunday, 1 January 2023 at 01:20:02 UTC, Ali Çehreli wrote: On 12/31/22 16:42, H. S. Teoh wrote: - runtime: The D runtime. Sometimes I see runtime facilities used as compile time and I'm having a hard time distinguishing that. It is even possible to use it with meta-programming

Re: Hipreme's #7 Tip of the day - Using the out parameters

2022-12-31 Thread zjh via Digitalmars-d-learn
On Saturday, 31 December 2022 at 17:13:16 UTC, Hipreme wrote: [...] Nice article.

Re: Compile time vs run time -- what is the difference?

2022-12-31 Thread Ali Çehreli via Digitalmars-d-learn
On 12/31/22 16:42, H. S. Teoh wrote: > "runtime" Going off topic, I've settled on three different spelling of that (those? :) ): - run time: As in this topic, things can happen at run time. - run-time: Adjective, as in run-time value of something. - runtime: The D runtime. Ali

Re: Address of a class object

2022-12-31 Thread Ali Çehreli via Digitalmars-d-learn
On 12/31/22 16:35, Paul wrote: > Can I acquire the address of a class object, Answering that question literally, yes, you can by casting the class variable to void*. But note: 'class object' means the instance of class in D. > not a class variable (i.e. > the instantiations of the class) D

Re: Address of a class object

2022-12-31 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Jan 01, 2023 at 12:35:40AM +, Paul via Digitalmars-d-learn wrote: > Hello. Thanks for any assistance. > > Can I acquire the address of a class object, not a class variable > (i.e. the instantiations of the class) but the object definition > itself? > > ```d > class MyClass {char c}

Re: Compile time vs run time -- what is the difference?

2022-12-31 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Dec 28, 2022 at 02:31:45AM +, thebluepandabear via Digitalmars-d-learn wrote: > I am reading through the free book on learning D by Ali Çehreli and I > am having difficulties understanding the difference between compile > time execution and run time execution in D language. It's very

Address of a class object

2022-12-31 Thread Paul via Digitalmars-d-learn
Hello. Thanks for any assistance. Can I acquire the address of a class object, not a class variable (i.e. the instantiations of the class) but the object definition itself? ```d class MyClass {char c} ... MyClass MyClassVar; writeln(); // this compiles writeln();// this does not ```

Hipreme's #7 Tip of the day - Using the out parameters

2022-12-31 Thread Hipreme via Digitalmars-d-learn
So, after some time using D, I found out that `out` isn't used in so many cases, but when used, it can be quite confusing, because if you don't read the documentation, it will be unclear that something is an `out` parameter, specially if you're reading a code that is not yours. Before using