Skip to main content

Questions tagged [design-choice-comparison]

For questions comparing different programming languages' designs of a feature.

4 questions from the last 365 days
Filter by
Sorted by
Tagged with
36 votes
7 answers
9k views

Why do "modern" languages not provide argv and exit code in main?

C/C++ has an entrypoint int main(int argc, char **argv);, which provides the program with the arguments passed to it and a way to signal back the result: ...
404 Name Not Found's user avatar
3 votes
1 answer
245 views

Multi-stage programming vs monomorphization/defunctionalization

I believe the main purpose of both multi-stage programming (à la MetaOcaml and ppx_stage) (AKA staged metaprogramming) and monomorphization (à la Roc and Rust) is to remove some amount of indirection ...
doesntgolf's user avatar
1 vote
0 answers
193 views

Designing conditional compilation blocks

ECMAScript and C have a totally different nature. Certain syntactic features are cryptic in C and don't fit exactly into ECMAScript dialects. For example, I don't think the following: ...
Hydroper's user avatar
  • 1,027
41 votes
7 answers
8k views

Why do (or don't) languages forbid unreachable code?

In Java, the following is a compile-time error, due to the unreachable statement: while(true) { break; System.out.println("unreachable"); } In ...
kaya3's user avatar
  • 20.8k