Arc Forumnew | comments | leaders | submitlogin
2 points by c-a-smallwood 3538 days ago | link | parent

Pull request submitted. I had to fix a small bug that I didn't check for before... It works now :)


2 points by akkartik 3538 days ago | link

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.

What do you think?

-----

2 points by c-a-smallwood 3538 days ago | link

I like both ideas, they flow well with arc and anarki's naming scheme. Something like the following:

  (def-isa list (alist _))

-----

2 points by c-a-smallwood 3538 days ago | link

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?

-----

1 point by akkartik 3538 days ago | link

Just submitted and then saw your comment: https://github.com/arclanguage/anarki/commit/4cfe8c36e5.

Feel free to change further or to revert if it doesn't look right. Nothing is set in stone.

-----

2 points by akkartik 3538 days ago | link

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?

-----

2 points by c-a-smallwood 3538 days ago | link

Works great!

-----