in reply to Re: XS Modules - why and when?
in thread XS Modules - why and when?
No, it's primarily about interfacing with an existing C library
Thanks...that makes a lot of sense. cavac's point about security resonates here -> Re^2: XS Modules - why and when?
But in RPi::DHT11, there doesn't seem to be any reason to use XS unless the C code already existed. I had assumed stevieb wrote the C code as well as the Perl code, but I have nothing to base that on.
If we look at RPi::PIGPIO::Device::DHT22 we can see a pure Perl method of reading the output from the device (DHT11 and DHT22 are read the same way). As Perl is rather good at bitwise and mathematical operations, it just seems weird to me that XS would be used in this situation.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: XS Modules - why and when?
by LanX (Saint) on Dec 05, 2023 at 12:02 UTC | |
Re^3: XS Modules - why and when?
by stevieb (Canon) on Dec 05, 2023 at 18:25 UTC | |
by cavac (Prior) on Dec 15, 2023 at 08:55 UTC | |
by Bod (Parson) on Dec 18, 2023 at 21:56 UTC | |
by cavac (Prior) on Dec 19, 2023 at 09:38 UTC | |
by stevieb (Canon) on Dec 20, 2023 at 08:47 UTC | |
| |
by bliako (Abbot) on Dec 19, 2023 at 07:53 UTC |