crocks icon indicating copy to clipboard operation
crocks copied to clipboard

Need to move `@@type` methods to `String` primatives

Open evilsoft opened this issue 8 years ago • 3 comments

You should at LEAST get it right

So I jumped the gun on Sanctuary Type Identifiers. They need to be String primitives and NOT functions that return a String primitive. See when happens when we try to integrate...Patterns that contradict the already established pattern of methods everywhere :smh:. Even though it is kinda gross, we already started this Team Player route, so we should finish it!!

But I think this is as far as we are going to go, sanctuary types and as much Fantasy Land as we can muster.

evilsoft avatar Feb 15 '18 06:02 evilsoft

This is great, I appreciate the effort. It's going to open up this library for me to use, uninhibited. However… 😁 I'd love to see some Sanctuary types to use with sanctuary-def. It may be a while before I can get to it, but I wouldn't mind getting my hands dirty with that effort if you are open to the idea. To be able to do something like:

const main = 
  def(
    'main',
    {},
    [$.String, IOType],
    input => IO.of(() => console.log(input))
  );

main(1) //  Error!

miwillhite avatar Feb 15 '18 18:02 miwillhite

Totally open!!

evilsoft avatar Feb 16 '18 05:02 evilsoft

This has been resolved with 0.9.0. Closing

evilsoft avatar Feb 22 '18 04:02 evilsoft