Re: floating-point-bits
"Tim Bradshaw (as tfb at cley dot com)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
On 15 Feb 2025, at 18:18, David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote: > > So it is confounding that Lisp, for all of its amazing capabilities, has never thought it necessary to represent Union types. A general union type is essentially impossible in a language like Lisp: what should the GC do if it meets an object which is a union of, say, a cons and an integer? What does such a type even mean? A specific thing which was essentially an array whose elements could be addressed as some subset of number & character types would probably be possible and would merely expose a great many implementation details (endianness, how floats are represented, &c) which CL does not currently expose. If I wanted to fill an array with floats from the network I'd do that in C, handing the guts of the array to a C function to fill and dealwith all the byte order questions. That's what C is good at. --tim _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html