Hi Jason,

Perhaps the PicoLisp documentation needs some updating, but the
functionality of 'native' and 'struct' is as it should be.

You have to understand that PicoLisp is not Ruby or NodeJS. There is no
hand-holding whatsoever. If you ask for X, that's what you get, by design.

As a somewhat long-term PicoLisp developer, I can tell you this is the
approach I want and it's why I stick with this language for most of my
applications. You can perhaps believe the language "should do X" to make
your life easier, but that's just adding assumptions about your specific
use-case, whereas there are plenty of use-cases which don't make the same
assumptions and which will fail when PicoLisp starts making decisions for
you.

That took a while for me to grok, and I did fight with the language on a few occasions,
but in the end I believe the author was right
all along. There are plenty of other languages which can do a lot of work
and formatting and massaging of data for you. PicoLisp is _not_ that and I
hope it doesn't become that, because for many of us this is what we need.

Once you come to terms with that, you'll have a much more enjoyable and
productive PicoLisp programming experience.

As a side note, I wrote a short PicoLisp/Rust example to demonstrate how
to interface the two:
  https://github.com/aw/picolisp-rust

As long as I dot my i's and cross my t's, it works perfectly and
everything is as expected.

Cheers,


AW

On Tue, 7 Dec 2021, Jason Vas Dias wrote:

Thanks Alex -

 But I have to respectfully disagree - 'struct' should know
 that if its current offset is 10, and it next needs to layout
 a 4-byte integer, it should insert 2 pad bytes to begin
 the integer at offset 12 - the same as it should know
 in the 'struct tm' case, that if it has just laid out a 4-byte integer
 at offset 32, ending at offset 36, and next needs to layout an 8-byte
 integer, it needs to insert 4 pad bytes to start the 8-byte integer
 at offset 40 .

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to