Re: floating-point-bits
"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
Byte Order…. That was an issue back in 1990. But today, all the processors in my lab speak little-endian (opposite of Standard Network Byte Order). So why do we have endian issues today? Not trying to be facetious here… just a question of progress vs legacy issues. - DM > On Feb 17, 2025, at 05:34, Tim Bradshaw <[email protected]> wrote: > > 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