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 633799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:13:31+00:00 2026-05-13T20:13:31+00:00

In language design circles there used to be a long-running debate over whether languages

  • 0

In language design circles there used to be a long-running debate over whether languages should use structural equivalence or name equivalence. Languages like ALGOL or ML or Modula-3 used structural equivalence while … well, pretty much most programming languages employ named equivalence (including Modula-2).

What are the typical arguments in favour of structural equivalence? What are the typical arguments in opposition to it? What are the typical arguments in favour of name equivalence? What are the typical arguments in opposition to it?

  • 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-13T20:13:31+00:00Added an answer on May 13, 2026 at 8:13 pm

    I think the advantage of structural type systems is that they encourage you to create fine-grained interfaces oriented towards what the user of the interface needs, rather than what the implementer provides.

    In a nominative type system you need a common dependency on the interface. In a structural type system that requirement is eliminated: you can build a loosely coupled system without needing to create that common library where you put all the interfaces. Each client can independently declare the interface it expects from a collaborator.

    The disadvantage of structural type systems is that they match up classes to interfaces which may not really implement the correct contract. For example, if you have this interface:

    public interface IBananaProvider
    {
       /// Returns a banana, never null.
       Banana GetBanana();
    }
    

    then the following class will implicitly be considered to implement IBananaProvider in a structural type system. However, the class violates the post condition that the returned banana is never null:

    public class SomeBananaProvider
    {
        // returns a banana or null if we're all out
        public Banana GetBanana()
        {
            if (bananas.Count > 0)
            {
                return bananas.RemoveLast();
            }
            else
            {
                return null;
            }
        }
    } 
    

    This could be fixed if the contract was somehow specified formally and considered part of the type structure. I think things are moving in that direction, e.g. System.Diagnostics.Contracts in .NET 4.0.

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

Sidebar

Related Questions

Question over here is are design patterns specific to a programming language or technology,
Is there a programming language that is testable by design or at least exhibit
I've read this relevant post, but there weren't many concrete answers (poor language design
OS: Windows Language: C/C++ The design demands to use a mutex variable across process
This is a language design question: Do you think unreachable code (in programming languages
An idle question on language design, see Does C# have a right hand if
Is this a CLR restriction or a language design decision? I tried to do
I've got a bit of fettish for language design and I'm currently playing around
It seems that I get the idea of call stack in programming language design.
We want to design a simple domain specific language for writing test scripts to

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.