Talk:Open–closed principle

This is a slightly modified version (to be consistent with other wikipedia articles) from foldoc.org. Jgorman2 12:01, 3 June 2006 (UTC)

"modified by extension"? Should not that be, modified by derivation (ie: thru a derived class)

The phrase "virtual inheritance" is a problem; should it be replaced with "delegation"? Baadams 19:33, 15 May 2007 (UTC)


 * ...or "interface inheritance"? Chrisahn 15:34, 17 October 2007 (UTC)

The open-closed principle by Meyer does not say what the article suggests. It gives a different meaning of "closed", namely "available for use by other modules". What is described in the article is Martin's open-closed principle, which is only remotely related to Meyer's principle (Martins claim that he is just paraphrasing Meyer notwithstanding). —Preceding unsigned comment added by 137.248.121.147 (talk) 13:00, 20 April 2010 (UTC)


 * I've rewritten the Meyer section to (I hope) better reflect Meyer's thinking, which may clarify the differences between Meyer's principle and Martin's. --Chronodm (talk) 22:50, 29 September 2015 (UTC)

I feel that this principle is more leaning toward composition and as a concern about opening possibilities to extension via separation of concerns and leaving responsabilities to client code rather than hardcoding decisions in implementation (such as exception management, or settings), although the article seems to be more about inheritance stuff. Am I wrong about my understanding of this concept? Gauthier.segay (talk) 17:32, 17 June 2010 (UTC) User:gauthier.segay

open/closed principle and functional programming un Java (8)
In his book Functional programming in Java (ch. 4, page 68), Venkar Subramaniam claimed to have used this principle using Java lambdas, not inheritance. Maybe a new field for this principle. Ptyxs (talk)

External links modified
Hello fellow Wikipedians,

I have just added archive links to 2 one external links on Open/closed principle. Please take a moment to review my edit. If necessary, add after the link to keep me from modifying it. Alternatively, you can add to keep me off the page altogether. I made the following changes:
 * Added archive https://web.archive.org/20060822033314/http://www.objectmentor.com:80/resources/articles/ocp.pdf to http://www.objectmentor.com/resources/articles/ocp.pdf
 * Added archive https://web.archive.org/20060822033314/http://www.objectmentor.com:80/resources/articles/ocp.pdf to http://www.objectmentor.com/resources/articles/ocp.pdf

When you have finished reviewing my changes, please set the checked parameter below to true to let others know.

Cheers.—cyberbot II  Talk to my owner :Online 06:06, 16 January 2016 (UTC)

Requested move 3 June 2018

 * The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review. No further edits should be made to this section. 

The result of the move request was: moved as requested per the discussion below. Dekimasu よ! 19:19, 9 June 2018 (UTC)

Open/closed principle → Open–closed principle – With the en dash, per MOS:DASH. There are many ways in the world to do this, and even the sources cited in the article so far show both these variants and just a space. The WP standard is the en dash. The nav template in this article would also need a conforming tweak. — SMcCandlish ☏ ¢ 😼  00:20, 3 June 2018 (UTC)


 * Support – uncontroversial style fix, should have just been moved. Dicklyon (talk) 14:51, 4 June 2018 (UTC)
 * If it had been at Open-closed principle (mistakenly using a hyphen) I would have just manually moved it. People are more apt to mount objections about slashes in computer-science contexts. While more often they're in proper names like CP/M, your average geek does not always understand the difference, and may make a specialized-style fallacy argument about what's the most common style in nerd circles. I learned from my RM-related keel hauling at ANI in 2014 that "people making loud but invalid arguments, and losing them repeatedly" can still constitute a "controversy" even if the applicable policy/guideline pages and the RM consensus record are crystal clear.  — SMcCandlish ☏ ¢ 😼  02:18, 5 June 2018 (UTC)
 * Support. Sources use a horizontal line, not a diagonal line.  Hyphen luddite.  --SmokeyJoe (talk) 04:26, 6 June 2018 (UTC)
 * Support. I agree that this is a good change -- the slash could imply "open or closed" when the principle is not framing it that way. --Atasato (talk) 10:42, 8 June 2018 (UTC)


 * The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.

The Typescript/JavaScript paragraph?
Why is that paragraph in the text at all? It poorly worded and formatted. If it is an example then it definitely lacks introductory "For example,". Looks like some plugged it in rather clumsily. — Preceding unsigned comment added by 82.4.210.6 (talk) 10:06, 8 October 2020 (UTC)