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: 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: 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

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

2022-12-28 Thread areYouSureAboutThat via Digitalmars-d-learn
On Wednesday, 28 December 2022 at 12:42:24 UTC, thebluepandabear wrote: Before even running the code I get an IDE warning (IntelliJ). Does IntelliJ compile the code in the background? It will NOT compile successfully unless you do one of these things: (1) ensure the result of the 'static

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

2022-12-28 Thread Ali Çehreli via Digitalmars-d-learn
On 12/28/22 08:04, Ali Çehreli wrote: > I don't think any of them can run the program though because > the program can be in a state that could harm its environment > like deleting unwanted files. I was too eager there. Likely no IDE goes that far. All they need is to understand the code

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

2022-12-28 Thread Ali Çehreli via Digitalmars-d-learn
On 12/27/22 18:31, thebluepandabear wrote: > What I do understand is that compile time and run time are the two > processes that your code goes through to be executed natively. There is a confusion: Compile time ends when the compiler generates the executable program, one that will be executed

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

2022-12-28 Thread thebluepandabear via Digitalmars-d-learn
On Wednesday, 28 December 2022 at 09:10:38 UTC, areYouSureAboutThat wrote: On Wednesday, 28 December 2022 at 02:31:45 UTC, thebluepandabear wrote: .. Other errors are only able to be spotted during run time such as exceptions, dividing by zero, assert blocks. With regards to the 'assert

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

2022-12-28 Thread areYouSureAboutThat via Digitalmars-d-learn
On Wednesday, 28 December 2022 at 02:31:45 UTC, thebluepandabear wrote: .. Other errors are only able to be spotted during run time such as exceptions, dividing by zero, assert blocks. With regards to the 'assert blocks' you mention, D (like C++) has both static assert and runtime assert.

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

2022-12-27 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 28 December 2022 at 02:31:45 UTC, thebluepandabear wrote: In Java and some other languages, during compile time the code gets executed into Java bytecode. This also happens for C#. I don't know if there is an equivalent 'intermediate' language for D that your code gets

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

2022-12-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/27/22 9:31 PM, thebluepandabear 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. Compile time execution is running your code being

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

2022-12-27 Thread thebluepandabear via Digitalmars-d-learn
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. What I do understand is that compile time and run time are the two processes that your code goes