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

Objects or No Objects #9

Closed
keean opened this issue Sep 22, 2016 · 8 comments
Closed

Objects or No Objects #9

keean opened this issue Sep 22, 2016 · 8 comments
Labels

Comments

@keean
Copy link
Owner

keean commented Sep 22, 2016

Discussion about records vs objects

@keean keean mentioned this issue Sep 22, 2016
@shelby3
Copy link

shelby3 commented Sep 23, 2016

Please define the terms 'record' and 'object' and why they are not the same?

Our misunderstandings arise when we have different perspectives on meanings and default semantics.

@shelby3
Copy link

shelby3 commented Sep 23, 2016

Link to potentially relevant discussion?

@keean
Copy link
Owner Author

keean commented Sep 23, 2016

If you read the OOHaskell paper you will find that an object is the fixed point of a record. However I in general prefer to separate data and functions.

A record is like a namespace, and a value of a record type is a particular implementation or value. In basic terms a record is like a C struct.

@shelby3
Copy link

shelby3 commented Sep 23, 2016

@keean wrote:

If you read the OOHaskell paper you will find that an object is the fixed point of a record.

Are you referring to page 15, where setting the tail to the Unit type?

Again this seems to be a conclusion that is specific to Haskell's type system and how you are representing inheritance? And what does inheritance have to do with objects?

@keean
Copy link
Owner Author

keean commented Oct 4, 2016

I think we are agreed to have simple objects. No inheritance just interfaces/type classes. Closing as decided.

@keean keean closed this as completed Oct 4, 2016
@keean keean added the Decided label Oct 4, 2016
@shelby3
Copy link

shelby3 commented Oct 4, 2016

You mean no virtual inheritance and no subclassing. But what about typeclass objects? And what about unions being subtypes? I don't think we can nail down those yet?

@keean
Copy link
Owner Author

keean commented Oct 4, 2016

I think the conclusion here is we are having objects, which will be at least simple objects. The other things are the subject of other threads, but to cover my thoughts, I don't think we need typeclass objects because we have union types. By no inheritance I mean you cannot extend object A. You can extend a typeclass but that is something different. We have interface inheritance, but not implementation inheritance.

@shelby3
Copy link

shelby3 commented Oct 5, 2016

@shelby wrote:

I don't think we need typeclass objects because we have union types.

Disagree.

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

No branches or pull requests

2 participants