Skip to main content

Questions tagged [design-choice-comparison]

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

Filter by
Sorted by
Tagged with
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
  • 19.1k
26 votes
2 answers
3k views

Studies on learnability of braces vs. indentation for code blocks for beginners?

The discussion whether using indentation for code blocks is better or worse than using braces is an old one, but I don't want to rehash that discussion here (for reference, there was a fairly recent ...
Schmuddi's user avatar
  • 363
2 votes
1 answer
331 views

Are enum members literals or constants in an IR?

While implementing enums in Tyr, I just realized that enum constants are the only form of literal-like entity that is not represented like a literal in the intermediate representation. The enum ...
feldentm's user avatar
  • 1,779
-4 votes
2 answers
301 views

What makes a very high level language? [closed]

Outline of question+justification soon to be expanded: Managing Complexity is job #1 Abstraction is our #1 tool A VHLL does abstraction best So VHLL's should be our aim Talking about VHLL's, with his ...
MicroservicesOnDDD's user avatar
26 votes
6 answers
2k views

How have modern language designs dealt with Unicode strings?

Languages developed over the last fifteen years or so have been within the era where Unicode is ubiquitous, and so could design their core string types accordingly. There are a lot of new issues that ...
Michael Homer's user avatar
  • 12.9k
-5 votes
1 answer
179 views

Are you allowed to use almost identical language to another language? [closed]

In Python, you use the term print. If there was another language that worked in the exact same way as Python, but used slightly different terms (like ...
taylor.2317's user avatar
12 votes
6 answers
486 views

Advantages and disadvantages of different iterator protocols

Many high-level languages have some kind of protocol or interface for iterators, allowing user-defined types to be used in "for-each" loops. A few examples from popular languages: In Java, ...
kaya3's user avatar
  • 19.1k
8 votes
5 answers
2k views

What are the advantages and disadvantages of just-in-time compilation?

Just-in-time compilation (JIT) is a way of implementing a language where the source code is given as input (like with a typical interpreter), but rather than being directly interpreted, (some or all ...
Rydwolf Programs's user avatar
15 votes
3 answers
419 views

What are the trade-offs in supporting Tail Recursion Optimization, but not Tail Call Optimization?

Tail Call Optimization allows a function call as the returned value of a function to be optimized to a goto, preventing the stack from growing. Among other things, ...
Rydwolf Programs's user avatar
10 votes
3 answers
785 views

What are the pros and cons of traits in comparison with interfaces?

In Rust, structs and enums may implement any number of traits, which specify certain functions. When a struct/enum implements a trait, this is where the functions are defined: ...
Rydwolf Programs's user avatar
14 votes
9 answers
708 views

What are some syntax options for describing generic ("templated") types?

In languages like C++ and Rust, generics use angle brackets. For example, Vec<f64> for a vec of floats, ...
Rydwolf Programs's user avatar