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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:23:26+00:00 2026-05-10T20:23:26+00:00

Steve Yegge recently posted an interesting blog post on what he calls the universal

  • 0

Steve Yegge recently posted an interesting blog post on what he calls the universal design pattern. In there he details using prototypes as a modelling tool, instead of classes. I like the way this introduces less coupling compared to inheritance. But that is something one can get with classes as well, by implementing classes in terms of other classes, instead of inheritance. Does anyone else have success stories of using prototypes, and can maybe help explain where using prototypes is advantageous compared to classes. I guess it comes down to static modelling versus dynamic modelling, but more examples would be very welcome.

  • 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. 2026-05-10T20:23:27+00:00Added an answer on May 10, 2026 at 8:23 pm

    One interesting bit is that it’s easy to make a prototype-based language act OO but it’s difficult to make an OO language act prototype-based.

    • Alex Arnell’s inheritance.js is a short and sweet chunk of code that makes JavaScript act OO, complete with access to the parent ‘Class’.
    • Here’s one of John Resig’s solutions to the same problem: http://ejohn.org/blog/simple-javascript-inheritance/.
    • Chapter 16 of Programming in Lua describes object orientation in Lua. Specifically, section 16.2 gives a nice example of inheritance.

    It’s not entirely clear what OO as prototype would look like, aside from composition versus inheritance as you mention.

    A prototype language makes complex inheritance behavior easy. You can implement multiple inheritance, mixin-like behavior, or just pick and choose what you want from one object to add to another.

    Wikipedia’s article mentions: ‘Advocates of prototype-based programming often argue that class-based languages encourage a model of development that focuses first on the taxonomy and relationships between classes. In contrast, prototype-based programming is seen as encouraging the programmer to focus on the behavior of some set of examples and only later worry about classifying these objects into archetypal objects that are later used in a fashion similar to classes.’

    That’s not to say the prototype paradigm is all pros and no cons. If OO is more restrictive, it’s because it chooses to be. I can see where all that flexibility might get you into trouble if you aren’t careful.

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

Sidebar

Ask A Question

Stats

  • Questions 59k
  • Answers 59k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer It is paranoia :) DB's don't grow in size unnecessarily,… May 11, 2026 at 9:03 am
  • added an answer Tricky internal way: InternalPlatform.getDefault().getBundleContext() could do it. You will find… May 11, 2026 at 9:03 am
  • added an answer I was able to get this done by modifying the… May 11, 2026 at 9:03 am

Related Questions

Steve Yegge recently posted an interesting blog post on what he calls the universal
Steve Yegge's wisdom notwithstanding, most developers are faced with requirements which were gathered from
I like Steve Yegge's Prototype Pattern example and decided to whip up a quick
The comments on Steve Yegge 's post about server-side Javascript started discussing the merits
This morning, I was reading Steve Yegge's: When Polymorphism Fails , when I came
One of Steve McConnell's checklist items is that you should not monkey with the
I'm just reading Code Complete by Steve McConell and I'm thinking of an Example
I have followed the blog post written by Steve Sanderson at blog.codeville.net/2008/10/14/partial-requests-in-aspnet-mvc . It

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.