Deutsch English Français Italiano |
<vamdgt$3c4ke$5@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.c Subject: Re: Top 10 most common hard skills listed on resumes... Date: Wed, 28 Aug 2024 05:45:01 -0000 (UTC) Organization: A noiseless patient Spider Lines: 41 Message-ID: <vamdgt$3c4ke$5@dont-email.me> References: <vab101$3er$1@reader1.panix.com> <vad7ns$1g27b$1@raubtier-asyl.eternal-september.org> <vad8lr$1fv5u$1@dont-email.me> <vafmiv$202ef$1@dont-email.me> <20240825201124.000017a3@yahoo.com> <86msl05ctt.fsf@linuxsc.com> <vai0ur$2fqc5$1@dont-email.me> <vajl47$2rhoq$3@dont-email.me> <vak058$2t849$2@dont-email.me> <valouj$35rt8$9@dont-email.me> <valqv5$367a8$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 28 Aug 2024 07:45:02 +0200 (CEST) Injection-Info: dont-email.me; posting-host="52d1e1001450c2fe7f8121ab25cdb228"; logging-data="3543694"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pxPBbqqz40oifj72iUwpv" User-Agent: Pan/0.160 (Toresk; ) Cancel-Lock: sha1:jL3NZ4sJQvoav1hF7VHFUrq890U= Bytes: 3020 On Wed, 28 Aug 2024 01:28:22 +0100, Bart wrote: > On 28/08/2024 00:53, Lawrence D'Oliveiro wrote: > >> On Tue, 27 Aug 2024 09:44:40 +0200, David Brown wrote: >> >>> Python does not support any significant degree of low-level >>> programming. >>> >>> A key example of low-level programming is control of hardware, which >>> on most systems means accessing memory-mapped registers at specific >>> addresses, reading and writing in specific orders. Python has no >>> means to do any of that - C and C++ both provide this ability. >> >> I’ve got news for you: this kind of thing is perfectly doable in Python >> <https://docs.python.org/3/library/ctypes.html>. > > It's Python calling a special module to do the dirty work. It’s a standard Python module. It uses standard Python constructs like “«n» * «type»” to construct an array of «n» elements of «type». I/O to/ from those objects are done using something called the “Buffer Protocol”, which is a core part of how Python works. I previously showed you how Python can even do low-level type discrimination at runtime -- try doing that with C. Maybe time to add the capability to C to call external Python modules, for help with this? “#include <pytypes.h>", anybody? > That's not far removed from Python just invoking an external C program > to do the job. But it is removed. And note that there is nothing in the C spec to require that C cannot do it that way as well. So don’t confuse implementation details with fundamental language characteristics. > By contrast, my scripting language can directly do the low level stuff. But it couldn’t do the dynamic type casting, could it?