On Fri, Mar 18, 2022 at 10:37 PM Elijah Stone <[email protected]> wrote: > On Fri, 18 Mar 2022, Raul Miller wrote: > > This makes no sense to me, as an english sentence: > > > > How can a programmer write a program to handle text if the language does > > not allow text to exist? > > That is nonsense. Programming is all about representation. You might as > well say: how can a programmer write a program to handle graphs if the > language does not allow graphs to exist?
A problem, with this argument, is that programs *are* text. Or, more specifically, we use text to represent programs. > > I imagine it would be useful to have a mechanism which, when applied to > > a character sequence, throws a runtime error if that sequence is not a > > valid unicode sequence. > > That is exactly the problem. There is no way to know what is 'valid', > because the language has no idea what is represented by a 1-byte > character. So it guesses, and makes different guesses in different > contexts, depending on what is most convenient. An issue here, I think, is that the unicode suite of standards defines quite a variety of ways of representing unicode characters. So, presumably, each of those would need a mechanism to test for the validity of the character representation mechanism. Thanks, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
