Questions tagged [language-features]
Questions about distinctive aspects of particular computer languages, particularly in the way they are written or in the expressive capabilities provided to the programmer.
153 questions
5 votes
4 answers
351 views
A [[byvalue]] attribute for C++?
Background C++ attributes are a useful way to document assumptions and intent within code, and to prevent warnings. (e.g. [[fallthrough]]) Now, the Core Guidelines recommend to For “in” parameters, ...
35 votes
11 answers
13k views
Why don't programming languages or IDEs support attaching descriptive metadata to variables?
As developers, we often face the challenge of balancing meaningful variable names with code readability. Long, descriptive names can make code harder to read, while short names may lack context. For ...
4 votes
3 answers
1k views
Why does HTML collapse whitespace?
I've been trying to better understand (at least at a high level) why the early versions of HTML were designed the way they were. Most of the decisions make sense; I can deduce (at least at a high ...
2 votes
1 answer
147 views
Hot reloading anonymous functions in a custom scripting language
I am implementing anonymous functions (lambdas) in a scripting language that supports hot reloading. The language currently supports passing user defined functions (pointers) to plugin functions which ...
9 votes
6 answers
2k views
Do any programming languages use types as values? Would there be any point?
The standard way that types are handled in programming languages that have such a concept, is that they are: removed entirely at compile time and are just used to determine memory layout, function ...
1 vote
3 answers
273 views
Unifying and modularizing the while / do feature set in c
disclaimer: I'm a university student who's one-year-new to programming. Please don't slaughter me in your responses as I am still a human being I have an idea that I want some feedback on. I am ...
-2 votes
1 answer
236 views
Is there a common agreed upon token symbol used in computer science or common across languages?
I have seen tokens like this: var message = "Hello, {Name}"; and like this: var message = "Hello, ${name}"; and like this: var message = "Hello, @NAME"; and a few ...
1 vote
2 answers
2k views
Logically, is there a reason why ++i++ can not be a valid expression?
I had to increment my integer twice in a loop, so I thought I would try and be clever: for (int i = 0; !sl.isEmpty(); ++i++) { ... } ++i++ however is not an assignable expression, at least in GCC. ...