10

I'm reading a journal article about Real-Time Concurrent C, and it mentions in the abstract (so any of you can see the context through that link as well) that "Concurrent C, is a parallel superset of C (and of C++)".

Now I know what a superset is, but what do they mean by a "parallel superset" when referring to programming languages?

pepers
  • 315
  • 3
  • 15

3 Answers3

19

They're claiming two things, not one thing that is "modified". It's like saying "a quick red car"; the car is quick and red, it's not having a fast color.

  • It's parallel, because it supports parallel programming
  • It's a super-set, because every valid C or C++ program is also a valid Concurrent C program.

That's a bit weird too, since not every valid C program is a valid C++ program.

unwind
  • 391,730
  • 64
  • 469
  • 606
  • That's where I was confused, I was thinking that parallel was somehow modifying what superset meant. Thank you. – pepers May 21 '15 at 15:35
  • 1
    C++ is often considered as a superset of C, since the differences are *often* trivial (or don't even come up). – user253751 May 22 '15 at 00:11
9

That's two separate concepts.

"Superset" means it extends the language, without removing or changing any existing language features. So any valid C program is (in theory) a valid Concurrent C program.

"Parallel" means that the extensions support parallel execution - programs can do more than one thing at the same time.

Mike Seymour
  • 249,747
  • 28
  • 448
  • 644
6

This article is old. It was written in some previous millennium. It predates the first C++ standard and the first release of the realtime extension to POSIX.

While C++ existed conceptually back then, there was no way to say what C++ was. There was no C++ standard, de facto or official, in 1991. Nowadays, there is a C++ standard.

C++ has not officially supported parallelism until very recently. POSIX extends C rather than C++, and strictly speaking, it is not a superset; it conflicts with the C standard in key areas. The same applies to Microsoft extensions to C/C++.

In my opinion, the first parallel supersets of ISO/IEC 9899 and ISO/IEC 14882, are C11 and C++11, and strictly speaking, even those are not supersets. They extend C/C++ in some areas, but restrict it in others (e.g., restrict, which wasn't a keyword in the original C standard).

David Hammen
  • 32,454
  • 9
  • 60
  • 108