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

  • Home
  • SEARCH
  • 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 186691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:41:29+00:00 2026-05-11T15:41:29+00:00

What makes a type different from class and vice versa? (In the general language-agnostic

  • 0

What makes a type different from class and vice versa?

(In the general language-agnostic sense)

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T15:41:30+00:00Added an answer on May 11, 2026 at 3:41 pm

    The following answer is from Gof book (Design Patterns)

    An object’s class defines how the object is implemented. The class defines object’s internal state and the implementation of its operations.

    In contrast, an object’s type only refers to its interface – a set of requests to which it can respond.

    An object can have many types, and objects of different classes can have the same type.

    //example in c++ template<typename T>  const T & max(T const &a,T const &b) { return a>b?a:b;  //> operator of the type is used for comparison } 

    max function requires a type with operation > with its own type as one of it interface any class that satisfies the above requirement can be used to generate specific max<particular class/primitive type> function for that class.

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

Sidebar

Related Questions

Today I discovered something that makes me sad: objects of type System.Generic.Collections.List don't have
When does using extension methods make sense? Does adding extension methods to a type
VC++ makes functions which are implemented within the class declaration inline functions. If I
What makes a language a scripting language? I've heard some people say "when it
I want to make sure people can't type the name of a PHP script
I make an AJAX request like so using JQuery: $.ajax({ type: GET, url: getvideo.php,
What is copyright licence type to select in order to make the code free
I have an object of the type System.Drawing.Image and want to make every pixel
I'm working on an application where users have to make a call and type
I have a small namespace containing some type definitions, which I use to make

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.