Open rebcabin opened 1 year ago
Perhaps to clarify the questions:
Character
of length 42 the same as or different from Character
of dimension*
[42]
?Character
the same as or different from an Integer
within appropriate limits?String
that is different from the type Character
?Clean answers to these questions should force a better design. Currently, I see only special-case kludges in terms like StringChr
, StringItem
, and StringCompare
.
This is a top-level design issue as the types for
Character
andString
are currently conflated, and some ASR terms further conflateCharacter
scalars withInteger
scalars.By Issue #51 ,
StringItem
might return aString
(which is actually aCharacter
), or anInteger
. Terms that take aStringItem
, therefore, must be prepared to take either aCharacter
or anInteger
. This need complicates ("complexifies," in Hickey-speak) the fine-grained types forstring-expr
andinteger-expr
.Resolution is possibly a redesign of those fine-grained types, or perhaps new, top-level types that distinguish
String
andCharacter
and permit a character to be either anInteger
or a new type for a primitive character.