Can anyone please give me a good understanding of whats the difference between run-time and compile-time?
相关问题
- Stop child process when parent process stops
- Pygame Distribution - Runtime Error
- Class in jar not found at runtime, but was used to
- Efficiently searching a common node in 2 singly li
- Are objective-c objects all same type of C-structu
相关文章
- Compile-time sizeof conditional
- How to create new type at runtime in F#? [closed]
- How can I create a MetadataWorkspace using metadat
- JNI or Runtime.exec()?
- Create a java class dynamically and compile and in
- Client-side Development Platforms based on JavaScr
- Recursively change system property at runtime in j
- Compile time operators in C
(edit: the following applies to C# and similar, strongly-typed programming languages. I'm not sure if this helps you).
For example, the following error will be detected by the compiler (at compile time) before you run a program and will result in a compilation error:
On the other hand, an error like the following can not be detected by the compiler. You will receive an error/exception at run-time (when the program is run).
Run time means something happens when you run the program.
Compile time means something happens when you compile the program.
Here is an extension to the Answer to the question "difference between run-time and compile-time?" -- Differences in overheads associated with run-time and compile-time?
The run-time performance of the product contributes to its quality by delivering results faster. The compile-time performance of the product contributes to its timeliness by shortening the edit-compile-debug cycle. However, both run-time performance and compile-time performance are secondary factors in achieving timely quality. Therefore, one should consider run-time and compile-time performance improvements only when justified by improvements in overall product quality and timeliness.
A great source for further reading here:
Apart from what it is said above I want to add that sometimes a picture worth 1000 words :
CLR_diag compile time and then runtime2
;
3.2 the difference between this 3 things : compile vs build vs runtime
https://www.quora.com/What-is-the-difference-between-build-run-and-compile Fernando Padoan, A developer that's just a bit curious for language design Answered Feb 23 I’m going backwards in relation to other answers:
running is getting some binary executable (or a script, for interpreted languages) to be, well… executed as a new process on the computer; compiling is the process of parsing a program written in some high level language (higher if compared to machine code), checking it’s syntax, semantics, linking libraries, maybe doing some optimization, then creating a binary executable program as an output. This executable may be in the form of machine code, or some kind of byte code — that is, instructions targeting some kind of virtual machine; building usually involves checking and providing dependencies, inspecting code, compiling the code into binary, running automated tests and packaging the resulting binary[ies] and other assets (images, configuration files, libraries, etc.) into some specific format of deployable file. Note that most processes are optional and some depend on the targeted platform you are building for. As an example, packaging a Java application for Tomcat will output a .war file. Building a Win32 executable out of C++ code could just output the .exe program, or could also package it inside a .msi installer.
The difference between compile time and run time is an example of what pointy-headed theorists call the phase distinction. It is one of the hardest concepts to learn, especially for people without much background in programming languages. To approach this problem, I find it helpful to ask
Compile time
Run time
What can go wrong are run-time errors:
Also there can be errors that are detected by the program itself:
In simply word difference b/w Compile time & Run time.
compile time:Developer writes the program in .java format & converts in to the Bytecode which is a class file,during this compilation any error occurs can be defined as compile time error.
Run time:The generated .class file is use by the application for its additional functionality & the logic turns out be wrong and throws an error which is a run time error