DIP62: Volatile type qualifier for unoptimizable variables in embedded programming
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 18 11:06:52 PDT 2014
On 07/17/2014 05:58 PM, Andrei Alexandrescu wrote:
>
> * "volatile" has been one of the most awkward parts of the C and C++
> specifications. If we're to learn of anything about it, it's we must
> stay away from it. It is extremely heavy for what it provides.
> ...
>
> ==============
>
> I think an approach based on functions peek/poke is a lot more promising.
I am not saying that we should add volatile as a type qualifier, but it
should be noted that programs with volatile type qualifiers can be
lowered to programs using peek/poke and possibly other API calls with
limited effort. (it is especially limited since the effort could be
mostly shared with 'shared', both in specification and implementation,
as it is another type qualifier that (will) (presumably) influence(s)
the behaviour of loads and stores.)
More information about the Digitalmars-d
mailing list