Skip to content

Comment on What is a primitive?parent

Comments

No, Haskell is weird since a string is [Char].

I can think of various langages where string is not a built-in, but i can’t think of a langage where string is not some sort of sequence, not just in its implementation but in its interface.

The definition also breaks down quickly e.g. is a complex a primitive? If not because they have real and imaginary parts, why are floats which have a mantissa and an exponent? And what about functions? What even is a child? Are value-less sum types primitives but valued ones not?

More importantly, how does it matter? What does the distinction you draw provide that is useful?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.