tag and isa already mean something in anarki. Any suggestions on how we integrate the existing type support with deftag? Feel free to send a pull request!
In truth, it's been about 5-6 years since I've collaborated on anyone's code that isn't my own. I'd love to submit a pull request :) I'm installing Racket & Anarki on this windows machine this morning to see about getting a working version. Do you think "deftype" would be ok for the macro name? Any other suggestions? Maybe something in the spirit of original Arc, like "pred" for predicate or something?
I think you're in the best position to judge :) Maybe play with a little example program and see what looks best in its context? If it doesn't seem to matter just pick one. We can always change it later.
I have to admit, I'm not sure how long it's been since somebody tried installing anarki on windows. Let me know when you run into problems. I'm actually amazed that I was able to get mtl running on linux so easily. Are you using cygwin?
No, I can't stand Cygwin. I actually wrote the original 1200 lines of the interpreter on Fedora. My goal was to try to keep it completely portable C code. As of right now, on my machine, I create a Win32 Console app in Visual Studio to compile MTL on Windows, and it works just fine. Initially I had some segfaults, but it was mainly due to the lack of exception checks and null checks... So as far as I can tell, it's pretty much cross platform at the moment.
In the few minutes I've used anarki, it seems to work just fine :) I just run it in the command-line Racket app by running:
Playing with it some more, I have a few ideas/tweaks :)
1. Maybe we should rename deftype to def-isa since it only overrides isa, not type or coerce? That would also fit with how we use defcall to extend coercion to function, defcoerce to extend coerce, defset to extend assignment, etc.
2. I'm thinking of renaming the types table to type-predicates.
At the same time, I kind of feel like having a dash makes it deviate a little... And "defisa" just doesn't look right in my opinion. Do you think having a slight variance would be ok?
Thanks! I see it now. Amazing how much difference it makes to see it working in a known context.
I figured out why '=' wasn't working; we were redefining it further down the file. I fixed it by moving deftype to later, and now we can go back to '='. https://github.com/arclanguage/anarki/commit/2c12a9e4f8. Does that seem reasonable?