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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:39:56+00:00 2026-05-16T03:39:56+00:00

So Squeak/Pharo support Traits and Newspeak has Mixins. What is the difference? Traits have

  • 0

So Squeak/Pharo support Traits and Newspeak has Mixins. What is the difference? Traits have no instVars but Mixins have?

  • 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-16T03:39:56+00:00Added an answer on May 16, 2026 at 3:39 am

    For a good comparison and for the reasoning of why traits are preferred, you can check the traits paper (pdf).

    In essence, it’s what Lukas Renggli said:

    Traits members are composed into a class, and don’t change its inheritance hierarchy. Conflicts have to be explicitly resolved by the user of the traits.

    Mixins are linearized into the target class’ inheritance hierarchy. If there’re conflicting members, the order in which they were declared dictates which member gets called. This is fragile because it implicitly defines the behavior of the composition, and the class author must be aware of potential conflicts and how they’ll impact the resulting class.

    Since mixins get linearized, they don’t suffer from the notorious “diamond problem” of multiple-inheritance. So the fragile nature in which they are stacked is another problem, which I’ll dub the “ruby problem“, to keep with the precious stone metaphor. For some odd reasons that have to do with moose, pearls don’t depict the problem as well as rubies.

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

Sidebar

Related Questions

How can you invoke shell commands from Squeak and Pharo? Do these environments have
This is in Squeak/Pharo. If I want to have a mapping between Character objects
I have an application that has it's entire GUI in one Morph. Pharo and
I'm trying to learn some Smalltalk. First found was Squeak, but since it has
I am using Squeak (can't use Pharo), and I have a Morphic application and
Does Smalltalk(especially Squeak/Pharo) have some form of variadic functions? I was just reading about
Smalltalk has the whileTrue:-Message implemented through recursion (in VisualWorks) or through compiler-inlining (in Squeak/Pharo).
I'm familiar with the VisualWorks and Dolphin versions of Smalltalk, but have not previously
I'm really begining to learn Smalltalk. Now I'm using Squeak , but there is
I'm new to Squeak and Smalltalk but not programming in general(i've some Python experience).

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.