C is Brittle D is Plastic
Araq
rumpf_a at web.de
Wed Apr 1 18:04:49 UTC 2026
On Wednesday, 1 April 2026 at 16:45:26 UTC, Walter Bright wrote:
> On 4/1/2026 9:35 AM, Araq wrote:
>> Well it's neither particularly simple to implement (is `T*x` a
>> declaration or a multiplication?) nor to use (so much UB...)
>> nor to read (too bad if the author used the preprocessor
>> extensively)... There is nothing "simple" about it; it lacks
>> many important features though... If you want simple, look
>> into Forth or Scheme or Oberon.
>
> As programming languages go, C is simple to implement, which
> gave it a big early boost in popularity.
>
> That doesn't mean it is simple to write robust, elegant code in
> it!
Sure, if you ignore anything like `volatile` and sequence points
and `_Atomic` and const qualifiers and its two-step tokenization
when you directly embed the preprocessor in your parser for
speed... Then it's simple, sure. In general, don't read the spec,
don't read the sections about valid type based aliasing and it's
fine.
More information about the Digitalmars-d
mailing list