OT: This Swift thing

Roy Smith roy at panix.com
Sat Jun 7 14:11:27 EDT 2014


In article <mailman.10853.1402162690.18130.python-list at python.org>,
 Michael Torrie <torriem at gmail.com> wrote:

> Technically C doesn't [have features to support hitting the hardware] 
> either, except via subroutines in libc, though C does have pointers 
> which would be used to access memory.

Several language constructs in C are there specifically to diddle bits 
in hardware.  Bit fields were in the earliest implementations of the 
language to allow you to address individual bit control and status bits 
in memory-mapped device controllers.  The volatile keyword is there to 
deal with bits which change value on their own (as hardware status 
registers do).

And, why do you need a library routine to touch a memory location, when 
you can just dereference an integer? :-)



More information about the Python-list mailing list