Skip to main content

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.

5 votes
4 answers
351 views

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, ...
Martin Ba's user avatar
  • 7,861
4 votes
4 answers
929 views

I've been wondering for a while why an ArrayList does not have a stack-like interface (think push() and pop()) I frequently find myself using these constructs in Java: list.get(list.size() - 1); list....
Mark Jeronimus's user avatar
35 votes
11 answers
13k views

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 ...
Shardul Vikram Singh's user avatar
5 votes
1 answer
2k views

This is a clarification of a closed question. I've limited the scope as requested. First, a few definitions, following e.g. A modular module system. Consider any programming language with a selected ...
Corbin's user avatar
  • 146
4 votes
3 answers
1k views

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 ...
Mathew Alden's user avatar
13 votes
4 answers
6k views

The commonly endorsed, and considered the most reliable, way of evaluating the security of a program is through examining its source code. That is, this method is based on the fundamental assumption: &...
Al Berger's user avatar
  • 279
2 votes
1 answer
149 views

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 ...
korri123's user avatar
  • 141
4 votes
4 answers
1k views

I'm going through a beginner programming learning guides and the teacher brings up the try catch block paradigm. The code you put in the try block is run and if an error happens the code in the catch ...
1.21 gigawatts's user avatar
9 votes
6 answers
2k views

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 ...
AIWalker's user avatar
  • 1,365
-2 votes
1 answer
531 views

C and C++ have standards, but support isn't perfect, the only available copies on the internet are drafts, and there are immensely useful things that aren't standard, such as __attribute__((cleanup)). ...
Dan's user avatar
  • 123
1 vote
3 answers
274 views

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 ...
Jack's user avatar
  • 49
1 vote
2 answers
2k views

When using templates we can have T be any type upon class instantiation. If T is a specific type that needs to be handled differently or in a special way we can specialize or partial specialize that ...
Francis Cugler's user avatar
-2 votes
1 answer
236 views

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.21 gigawatts's user avatar
4 votes
4 answers
1k views

As an example, in PHP you can run gettype($myVariable); to obtain the type of a variable $myVariable. Is such functionality antithetical to OOP principles?
gen's user avatar
  • 338
1 vote
2 answers
2k views

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. ...
Anon's user avatar
  • 3,649

15 30 50 per page
1
2 3 4 5
11