Newest Questions

17 votes
4 answers
3k views

Why did C99 have to add the underscored keywords for _Bool _Complex _Imaginary but not for inline or restrict?

C99 introduced the following keywords: _Bool _Complex _Imaginary ...
CPlus's user avatar
  • 10.3k
1 vote
2 answers
284 views

How does the GNU Assembler deal with the directives for changing the syntax from AT&T to Intel or vice versa if those directives are in if-branching?

GNU Assembler, when targetting x86, has directives .att_syntax and .intel_syntax for switching between Intel Syntax and AT&T ...
FlatAssembler's user avatar
13 votes
2 answers
806 views

What optimizations are possible with unsequenced operators?

In C, most binary operators do not specify which operand will be evaluated first: ...
CPlus's user avatar
  • 10.3k
6 votes
1 answer
1k views

Why does the `target` attribute in HTML require a string starting with an underscore, such as `"_blank"`? Why not simply `"blank"`?

To specify in HTML that an <a> link needs to opened in a new tab or a new window, you use the following syntax: ...
FlatAssembler's user avatar
4 votes
1 answer
310 views

Are there OO languages which implement objects as persistent data-structures?

I am an object-oriented developer professionally, but I have researched functional programming and (believe that) I understand the key principles which to varying degrees are applied in FP languages. ...
Kyohei Kaneko's user avatar
6 votes
4 answers
535 views

Do any notable programming languages other than Fortran mark line continuation at the beginning of the following line?

In the first high-level language (FORTRAN), lines of text would by default be treated as individual statements, except that a card which contained something other than an asterisk or C in column 1 and ...
supercat's user avatar
  • 2,252
1 vote
1 answer
303 views

C specification's "sequenced before" and "pair-wise relation"

Paragraph 5.2.2.4 of ISO 9899:2024 says Sequenced before is an asymmetric, transitive, pair-wise relation between evaluations executed by a single thread... What does the pair-wise relation mean? Is ...
Black Monk's user avatar
-1 votes
1 answer
284 views

Strongest criticisms of object-oriented languages? [closed]

Linus Torvalds has famously attacked the object-oriented language C++, but he didn't offer many specifics about why, besides saying C++ uses "inefficient abstracted programming models". What ...
Geremia's user avatar
  • 109
1 vote
3 answers
283 views

What to do with productions that have multiple LHS?

In the C language, a function call has a parameter list of assignment-expressions defined as: ...
DannyNiu's user avatar
  • 353
3 votes
1 answer
1k views

Strings and arrays in Project Valhalla

My understanding of Project Valhalla's impact on arrays and Strings (please let me know if this is off): arrays will still be reference objects but an array of ...
BPS's user avatar
  • 133
3 votes
1 answer
193 views

Alternatives to ANTLR 3 for LL(1) Grammar verification

I'm developing an expression language using a LL(1) recursive descent parser. Technically it's actually LL(2) since I need an extra lookahead in one place. I'm using ANTLR 3 (ANTLRWorks) to verify ...
Nexus's user avatar
  • 31
26 votes
3 answers
7k views

Why do many programming languages use the symbol of two vertical parallel lines `||` to mean "or"?

Why do many programming languages use the symbol of two vertical parallel lines || to mean "or"? Is it because two switches connected in parallel form a ...
FlatAssembler's user avatar
0 votes
3 answers
209 views

Distinguish identifier reference and definition

I have the following prototype grammar that I intend to use to test a home-made LR(1) parser. During the process of writing it, I realize that there's a potential ambiguity with regard to the function ...
DannyNiu's user avatar
  • 353
-1 votes
2 answers
414 views

If in computer science, compare-and-swap is known as "compare-and-swap," why are the C/C++ functions named atomic_compare_exchange_*?

In computer science, compare-and-swap is known as, well, "compare-and-swap" and often abbreviated as "CAS." Why are the functions in the standard C library and C++ library named <...
Paul J. Lucas's user avatar
3 votes
2 answers
270 views

Alternatives for concept of sub-modules

I imagine that I would like to have some form of sub-module concept in my language. Where the exposed types and functions of the sub-module is accessible for the parent module, but not for other ...
Jonas's user avatar
  • 585

15 30 50 per page
1
2
3 4 5
59