chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] blob-literal read syntax


From: Felix
Subject: Re: [Chicken-hackers] blob-literal read syntax
Date: Tue, 19 Oct 2010 02:43:03 -0400 (EDT)

From: Peter Bex <address@hidden>
Subject: Re: [Chicken-hackers] blob-literal read syntax
Date: Mon, 18 Oct 2010 15:39:46 +0200

> 
> What about #blob(...) or #m(...) (for "memory") if "blob" causes
> trouble with binary number literal syntax?

Yes, that would look ambiguous, I guess.

> 
> By the way, how is the data represented?  Will entering it like this
> be dependent on the reading machine's endianness?

It is just a sequence of bytes, so it is endian-independent. The data
type already exists for a while (what used to be "bytevector" in older
chickens). But since we have SRFI-4 vectors, the bytevector has become
redundant, so it has been left as a "blob", a meaningless sequence of
bytes. There are situations where such a thing may be useful in code,
in particular, machine-generated code, so I found it reasonable
to add support for literals of this type, to have a more efficient
handling of such data in compiled Scheme programs (instead of
constructing it at runtime).


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]