Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3242654
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:20:26+00:00 2026-05-17T18:20:26+00:00

At first glance, there obvious distinctions between the two kinds of class. However, I

  • 0

At first glance, there obvious distinctions between the two kinds of “class”. However, I believe there are more similarities:

  • Both have different kinds of constructors.
  • Both define a group of operations that could be applied to a particular type of data, in other words, they both define an Interface.

I can see that “class” is much more concise in Haskell and it’s also more efficient. But, I have a feeling that, theoretically, “class” and “abstract class” are identical.

What’s your opinion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:20:27+00:00Added an answer on May 17, 2026 at 6:20 pm

    Er, not really, no.

    For one thing, Haskell’s type classes don’t have constructors; data types do.

    Also, a type class instance isn’t really attached to the type it’s defined for, it’s more of a separate entity. You can import instances and data definitions separately, and usually it doesn’t really make sense to think about “what class(es) does this piece of data belong to”. Nor do functions in a type class have any special access to the data type an instance is defined for.

    What a type class actually defines is a collection of identifiers that can be shared to do conceptually equivalent things (in some sense) to different data types, on an explicit per-type basis. This is why it’s called ad-hoc polymorphism, in contrast to the standard parametric polymorphism that you get from regular type variables.

    It’s much, much closer to “overloaded functions” in some languages, where different functions are given the same name, and dispatch is done based on argument types (for some reason, other languages don’t typically allow overloading based on return type, though this poses no problem for type classes).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From first glance, it would appear I have two basic choices for storing ZIP
(At first glance this may look like a duplicate of Different execution plan when
This probably sounds like a terrible idea at first glance, but here is my
first take a look on this picture from localScope app : i have 2
First you should know I have looked into many questions and none of them
Installed a captcha on my blog, been good up until now. There have recently
On a first glance it looks like JSDoc or jsdoc-toolkit, yet I see tags
I'm looking for a good ORM for my android application and at first glance
I know that many people, at a first glance of the question, may immediately
This might at first glance seem rather similar to this question , but in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.