3 ms·
(Sorry for late reply, woops) Hm, thanks for the manual reference (heh, should have gone and looked). Now to go figure out what "xs head" means... I think the
by exikyut 8y ago
(Sorry for late reply, woops)
Hm, thanks for the manual reference (heh, should have gone and looked). Now to go figure out what "xs head" means...
I think the tokenizer choices are pragmatic and interesting. They make the language less simply annoying and irritating, and thus more accessible to learn.
The idea of a systems language with Kitten's focuses sounds good - oddball alternatives always serve to (slowly) influence the mainstream, let's hope that happens here :D
The approach to documentation is reasonable too, if unintuitive at first glance; providing a language that implements the 95th percentile of what is advertised is actually not that bad of an approach.
- evincarofautumn 8y ago“head” has the type: <T> (List<T> -> Optional<T>) (“For any type T, function from list of T to optional T.”) So assuming “xs” is a list, “xs head” is either a full Optional (“some”) containing the first element of the list, or an empty Optional (“none”) if the list was empty—typed, of course, according to the element type of the input list, so if “xs” has type “List<Int32>” then “xs head” has type “Optional<Int32>”.