Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies in types definitions #29

Closed
abuseofnotation opened this issue Mar 23, 2016 · 4 comments
Closed

Inconsistencies in types definitions #29

abuseofnotation opened this issue Mar 23, 2016 · 4 comments

Comments

@abuseofnotation
Copy link

The following two definitions are both correct, but they are inconsistent:

A monoid is some data type and a two parameter function ...

An object with a map function that adhere to certains rules. ...

I don't know which of the two is better. The "object with some methods" style of definition, limits us in some ways, for example we cannot say "pure functions form a monoid under functional composition". The other one seems impractical. Maybe we should incorporate both.

@jethrolarson
Copy link
Collaborator

Functions are objects so it's not too much worry to me

On Wed, Mar 23, 2016, 8:30 AM boris notifications@github.com wrote:

The following two definitions are both correct, but they are inconsistent:

A monoid is some data type and a two parameter function ...

An object with a map function that adhere to certains rules. ...

I don't know which of the two is better. The "object with some methods"
style of definition, limits us in some ways, for example we cannot say
"pure functions form a monoid under functional composition". The other one
seems impractical. Maybe we should incorporate both.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#29

@abuseofnotation
Copy link
Author

Not my point.
I think we should either say A monoid is...

  • An object with a map method which accepts a function.
  • A datastructure plus some method which accepts that datastructure plus a function.

We all know that these two things are essentially the same but we should stick with one of them in order to be consistent (else a person who is reading the docs would presume that there is some difference between the two concepts.

Another way that is more verbose but also clearer is to say both things. Something like...

"A monoid is an object with a map method (or a separate function)..."

Cheers everyone.

@jethrolarson
Copy link
Collaborator

I think we should say function instead of method. While methods can be
used, that won't always be true and anything you can do with methods you
can do with functions. Number and add are a monoid but i can't don't expect
it to be implemented as a method, nor for compose

On Fri, Mar 25, 2016, 1:45 AM boris notifications@github.com wrote:

Not my point.
I think we should either say A monoid is...

  • An object with a map method which accepts a function.
  • A datastructure plus some method which accepts that datastructure
    plus a function.

We all know that these two things are essentially the same but we should
stick with one of them in order to be consistent (else a person who is
reading the docs would presume that there is some difference between the
two concepts.

Another way that is more verbose but also clearer is to say both things.
Something like...

"A monoid is an object with a map method (or a separate function)..."

Cheers everyone.


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#29 (comment)

@jethrolarson
Copy link
Collaborator

All references to "method" have been removed from the document so I think we can call this resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants