7 ms·
I don't know. I'm not a CL user. I understand that they actually do have a type system, which can be used to verify that your inputs are of the correct type and
by qwertyuiop924 10y ago
I don't know. I'm not a CL user. I understand that they actually do have a type system, which can be used to verify that your inputs are of the correct type and match your assumptions. As for contracts, I wouldn't be surprised if someone wrote a macro for it: they're not exactly rocket science, at their simplest.
Don't ask me: I'm using Chicken Scheme, which provides both (to an extent: The documentation is worryingly vague about how the type system handles failure).
- catnaroek 10y agoChecking alone isn't the point. As things stand, it's no better than C, where the type checker can approve your code, yet it still has undefined behavior.
- qwertyuiop924 10y agoSo you want exhaustive matching? I don't know if any lisp provides that by default. One of them probably does, somewhere. But since you don't mind Lisp syntax, and really like type systems, have you tried Shen? (http://www.shenlanguage.org http://www.shenlanguage.org) it's an interesting project.
- catnaroek 10y ago> But since you don't mind Lisp syntax, and really like type systems, have you tried Shen? I also want: (0) Type inference. Shen seems to require all typed code to be manually type-annotated. (1) A decent module system. There seems to be no mention of abstract types in Shen's documentation. (2) A guarantee that dynamically typed code won't break abstractions defined in statically typed code.
- qwertyuiop924 10y agoI'm pretty sure shen has limited type inference. There might be ADTs.