On Tue, Nov 15, 2022 at 12:21 PM Lassi Kortela <[email protected]> wrote:
I'm strongly in favor of using the same syntax as neighboring languages > whenever possible. However, Scheme should only use #S if the syntax is > compatible with Common Lisp #S. > CL's lexical syntax for structures is #S(structure-type-name :field-name field-value ...), and works only if the structure-type-name has the same meaning on the read side as on the write side. In addition, SRFI 4/160 has #s8, #s16, #s32, #s64, ... which are unrelated to structures/records. (We already have this problem with #f vs. #f16, #f32, ...; in plain RnRS #f32(1 2 3) would be read as three datums.) > Everyone is prone to think their favorite concepts are fundamental :) > Imagine the next 50 years - that's a lot of time to make new additions, > especially to a large language. > Intersection types *are* fundamental. Lisp is fundamentally about symbols and lists (an abstract data type of > which linked lists are one implementation). Strings and integers are > also indispensable in any language. Beyond that, it's debatable. > There are languages that don't provide an integer datatype, only floats. But there are also very few languages without arrays or mappings of some sort. > Also, note that hypothetical prefixes like #r8 or #ru16 would still be > > in the list of not yet reserved prefixes. I.e. represent opaque data types as records? How would this work > technically; is this explained in detail somewhere? The idea may be a > good one, I just don't understand it. > > John has done good work on # extensibility in connection with the > "Twinjo" project (which is on the back burner, but definitely not > forgotten). He is using # followed by a full word instead of one letter. > ...followed by a number, list (within parens), string, symbol, or hex-digit bytevector (within braces). In addition, # followed by a single letter is a singleton.
