Questions tagged [compile-time]
13 questions
106
votes
5 answers
How does shifting to microservices create a run-time problem?
The following commentator writes:
Microservices shift your organizational dysfunction from a compile time problem to a run time problem.
This commentator expands on the issue saying:
Feature not bug. Run time problem => prod issues => stronger,…

hawkeye
- 4,819
- 3
- 24
- 35
23
votes
8 answers
Detect manual changes to an autogenerated C header
I have a C header that is generated from a CSV file and a Python script. The C header mainly contains a list of #define constants.
I want to be able to detect manual changes to this header during compilation (which tends to happen frequently in this…

9a3eedi
- 2,101
- 3
- 23
- 29
9
votes
1 answer
Is there any reason *not* to forward declare all forward declarable function parameter/return types?
I ran into a situation where my build speeds have started to become large and have affected productivity. I had already minimized header dependencies before using forward declarations. Now I've turned to forward declarations to further reduce…

Krupip
- 1,252
- 11
- 19
5
votes
0 answers
Reason for sudden rise in popularity of compile-time annotation processing in Java
So compile-time annotation processing is as old as the annotations themselves in Java. Yet most of the useful libraries were developed with the runtime approach in mind – at least at first.
Now, however, I notice a recent rise in interest in the…

Michal M
- 159
- 5
3
votes
3 answers
How useful is JNI in android?
In java/android we can call code written in the c/c++ language for execution speed advantage. I have heard of Ahead Of Time compilation which (as far as i know) compiles the entire application to native code during its installation.
I want to…

pebble
- 141
- 4
2
votes
2 answers
When calculating the runtime of a c++ program, how do you factor in constexpr/tmp functions?
It's mostly all in the title. How do you report the runtime of a C++ program that has intensive calculations at compile-time?
If I have a program that, when I use the bash time command on it, appears to run in .5 seconds, but the COMPILE TIME…

HiddenToad
- 31
- 3
2
votes
2 answers
Mixing compile time condition with runtime conditions. Bad design?
On a C++ project I got an idea to mix some compile time macro with std::optional to do something like :
#include
struct Foobar
{
std::optional foo;
std::optional bar;
};
int main()
{
Foobar foobar;
#ifndef…

f222
- 1,020
- 6
- 17
2
votes
3 answers
Comparison of build times on various hardware; why non-linear results?
Why do the compile times not vary significantly between different era CPUs, even though disk (NVMe vs. HDD) and CPU benchmarks vary significantly in performance?
Why does disabling hyperthreading affect performance significantly with the Ryzen…

casualcoder
- 345
- 3
- 10
1
vote
1 answer
Variable binding time (Steve McConnell)
Currently reading Steve McConnell "Code complete". "General issues in using variables" chapter, "Binding time" section. He says about variable's binding time in such languages as C++ and Java, that have phases like compiling.
Coding time (use of…

CoderDesu
- 1,005
- 5
- 10
0
votes
2 answers
What is the meaning of the line - "the compiler is self-compiling if it is written in P"?
According to compiler definition, the compiler is a program that translates a program written in a programming language P (source code) into a program written in a machine language M (machine code).
And also "the compiler is self-compiling if it is…

coding_ninza
- 117
- 5
-1
votes
2 answers
What does syntactically legal string mean in compiler design?
In programming language theory semantics, semantic is the field
concerned with the rigorous mathematical study of the meaning of
programming languages. It does so by evaluating the meaning of
syntactically legal strings defined by a specific…

coding_ninza
- 117
- 5
-2
votes
2 answers
c++ compile-time function check
I am experimenting with complex FSM frameworks. For one of the approaches I am considering I would like to have two types of function: plain function and special function. The exact meaning does not matter. I want to have compile-time enforcement…

zzz777
- 456
- 1
- 5
- 11
-3
votes
1 answer
What programming languages besides Apple Swift & Objective-C use the Llvm compile-time Automatic Reference Counting exclusively for memory management?
Are there other general purpose programming languages besides Objective-C +ARC and Swift which target the llvm and use static compile time Automatic Reference Counting for memory management?

v217
- 95
- 2