<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: object-oriented-programming</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/object-oriented-programming.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2025-12-05T04:28:05+00:00</updated><author><name>Simon Willison</name></author><entry><title>Thoughts on Go vs. Rust vs. Zig</title><link href="https://simonwillison.net/2025/Dec/5/go-vs-rust-vs-zig/#atom-tag" rel="alternate"/><published>2025-12-05T04:28:05+00:00</published><updated>2025-12-05T04:28:05+00:00</updated><id>https://simonwillison.net/2025/Dec/5/go-vs-rust-vs-zig/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://sinclairtarget.com/blog/2025/08/thoughts-on-go-vs.-rust-vs.-zig/"&gt;Thoughts on Go vs. Rust vs. Zig&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Thoughtful commentary on Go, Rust, and Zig by Sinclair Target. I haven't seen a single comparison that covers all three before and I learned a lot from reading this.&lt;/p&gt;
&lt;p&gt;One thing that I hadn't noticed before is that none of these three languages implement class-based OOP.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=46153466"&gt;Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/go"&gt;go&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming-languages"&gt;programming-languages&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rust"&gt;rust&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/zig"&gt;zig&lt;/a&gt;&lt;/p&gt;



</summary><category term="go"/><category term="object-oriented-programming"/><category term="programming-languages"/><category term="rust"/><category term="zig"/></entry><entry><title>Object models</title><link href="https://simonwillison.net/2017/Nov/29/object-models/#atom-tag" rel="alternate"/><published>2017-11-29T14:59:12+00:00</published><updated>2017-11-29T14:59:12+00:00</updated><id>https://simonwillison.net/2017/Nov/29/object-models/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://eev.ee/blog/2017/11/28/object-models/"&gt;Object models&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Extremely comprehensive and readable discussion of the object models of Python, JavaScript, Lua and Perl 5. I learned something new about every one of those languages.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/eevee/status/935747003077840897"&gt;eevee&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lua"&gt;lua&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="lua"/><category term="object-oriented-programming"/><category term="perl"/><category term="python"/></entry><entry><title>Will a professional programmer lose anything if he doesn't learn object oriented programming?</title><link href="https://simonwillison.net/2013/Nov/1/will-a-professional-programmer/#atom-tag" rel="alternate"/><published>2013-11-01T09:34:00+00:00</published><updated>2013-11-01T09:34:00+00:00</updated><id>https://simonwillison.net/2013/Nov/1/will-a-professional-programmer/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/Will-a-professional-programmer-lose-anything-if-he-doesnt-learn-object-oriented-programming/answer/Simon-Willison"&gt;Will a professional programmer lose anything if he doesn&amp;#39;t learn object oriented programming?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Yes. OOP is a very important programming concept - a professional programmer who is not familiar with it will be unable to understand vast swathes of high quality existing code and will have a great deal of trouble passing interviews or contributing effectively at great companies.&lt;/p&gt;

&lt;p&gt;That's not to say that every line of code you write should use OOP, but if you don't understand it you're greatly damaging your ability to become a competent programmer.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/software-engineering"&gt;software-engineering&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/><category term="programming"/><category term="software-engineering"/><category term="quora"/></entry><entry><title>The History of Python: Adding Support for User-defined Classes</title><link href="https://simonwillison.net/2009/Feb/18/history/#atom-tag" rel="alternate"/><published>2009-02-18T23:00:16+00:00</published><updated>2009-02-18T23:00:16+00:00</updated><id>https://simonwillison.net/2009/Feb/18/history/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://python-history.blogspot.com/2009/02/adding-support-for-user-defined-classes.html"&gt;The History of Python: Adding Support for User-defined Classes&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Guido designed the run-time representation first, and tried to design the syntax to include as few new parsing concepts as possible. The origins of explicit self are also explained.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/css-classes"&gt;css-classes&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/guido-van-rossum"&gt;guido-van-rossum&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="css-classes"/><category term="guido-van-rossum"/><category term="object-oriented-programming"/><category term="python"/></entry><entry><title>Transitioning from Java Classes to JavaScript Prototypes</title><link href="https://simonwillison.net/2008/Feb/10/classes/#atom-tag" rel="alternate"/><published>2008-02-10T15:10:21+00:00</published><updated>2008-02-10T15:10:21+00:00</updated><id>https://simonwillison.net/2008/Feb/10/classes/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://peter.michaux.ca/article/5004"&gt;Transitioning from Java Classes to JavaScript Prototypes&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Peter Michaux shows how JavaScript’s prototypal inheritance can run rings around traditional Java-style classes once you figure out how to take advantage of it.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/inheritance"&gt;inheritance&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/java"&gt;java&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pete-michaux"&gt;pete-michaux&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototypal-inheritance"&gt;prototypal-inheritance&lt;/a&gt;&lt;/p&gt;



</summary><category term="inheritance"/><category term="java"/><category term="javascript"/><category term="object-oriented-programming"/><category term="pete-michaux"/><category term="prototypal-inheritance"/></entry><entry><title>Quoting Cal Henderson</title><link href="https://simonwillison.net/2007/Nov/2/cal/#atom-tag" rel="alternate"/><published>2007-11-02T06:23:05+00:00</published><updated>2007-11-02T06:23:05+00:00</updated><id>https://simonwillison.net/2007/Nov/2/cal/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://poorbuthappy.com/ease/archives/2007/11/01/3930/the-web-application-scale-of-stupidity"&gt;&lt;p&gt;The Web Application Scale of Stupidity goes from OGF (One Giant Function) to OOP (Object Oriented Programming), like this: OGF ——– sanity ——— OOP&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://poorbuthappy.com/ease/archives/2007/11/01/3930/the-web-application-scale-of-stupidity"&gt;Cal Henderson&lt;/a&gt;, paraphrased&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/cal-henderson"&gt;cal-henderson&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ogf"&gt;ogf&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/onegiantfunction"&gt;onegiantfunction&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/peter-van-dijck"&gt;peter-van-dijck&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php"&gt;php&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;&lt;/p&gt;



</summary><category term="cal-henderson"/><category term="ogf"/><category term="onegiantfunction"/><category term="object-oriented-programming"/><category term="peter-van-dijck"/><category term="php"/><category term="programming"/></entry><entry><title>Quoting Ralph Johnson</title><link href="https://simonwillison.net/2007/Aug/8/erlang/#atom-tag" rel="alternate"/><published>2007-08-08T19:47:12+00:00</published><updated>2007-08-08T19:47:12+00:00</updated><id>https://simonwillison.net/2007/Aug/8/erlang/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;amp;printTitle=Erlang,_the_next_Java&amp;amp;entry=3364027251"&gt;&lt;p&gt;Erlang fits all the characteristics of an OO system, even though sequential Erlang is a functional language, not an OO language&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;amp;printTitle=Erlang,_the_next_Java&amp;amp;entry=3364027251"&gt;Ralph Johnson&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/erlang"&gt;erlang&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/java"&gt;java&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;&lt;/p&gt;



</summary><category term="erlang"/><category term="java"/><category term="object-oriented-programming"/><category term="programming"/></entry><entry><title>Ned Batchelder: A quest for pythonic interfaces</title><link href="https://simonwillison.net/2004/Nov/10/batchelder/#atom-tag" rel="alternate"/><published>2004-11-10T01:03:20+00:00</published><updated>2004-11-10T01:03:20+00:00</updated><id>https://simonwillison.net/2004/Nov/10/batchelder/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.nedbatchelder.com/text/pythonic-interfaces.html"&gt;Ned Batchelder: A quest for pythonic interfaces&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
More Ned on interfaces.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ned-batchelder"&gt;ned-batchelder&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="ned-batchelder"/><category term="object-oriented-programming"/><category term="python"/></entry><entry><title>Ned Batchelder: Interfaces</title><link href="https://simonwillison.net/2004/Nov/10/ned/#atom-tag" rel="alternate"/><published>2004-11-10T01:03:05+00:00</published><updated>2004-11-10T01:03:05+00:00</updated><id>https://simonwillison.net/2004/Nov/10/ned/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.nedbatchelder.com/text/interfaces.html"&gt;Ned Batchelder: Interfaces&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Ned on interfaces.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ned-batchelder"&gt;ned-batchelder&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;&lt;/p&gt;



</summary><category term="ned-batchelder"/><category term="object-oriented-programming"/><category term="programming"/></entry><entry><title>Catching up with Harry</title><link href="https://simonwillison.net/2004/Feb/18/harry/#atom-tag" rel="alternate"/><published>2004-02-18T03:56:59+00:00</published><updated>2004-02-18T03:56:59+00:00</updated><id>https://simonwillison.net/2004/Feb/18/harry/#atom-tag</id><summary type="html">
    &lt;p&gt;I'm not sure how I missed this, but Harry Fueck's new book &lt;a href="http://www.sitepoint.com/books/phpant1/"&gt;The PHP Anthology&lt;/a&gt; was published by SitePoint back in December, as a hefty 2 volume epic. Harry is the guru behind &lt;a href="http://www.phppatterns.com/"&gt;PHP Patterns&lt;/a&gt; and &lt;em&gt;really&lt;/em&gt; knows his stuff. While the book is at first glance a cookbook for solving web related problems, Harry also uses it as &lt;a href="http://www.phppatterns.com/index.php/article/articleview/101/1/11/" title="The PHP Anthology and more blogging"&gt;a platform for teaching sensible development practises&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote cite="http://phppatterns.com/index.php/article/articleview/101/1/11/"&gt;
&lt;p&gt;Between the lines I've focused on teaching OOP by example, partly by developing classes in the book and also by taking advantage of Open Source class libraries I'm familiar with; in most cases projects from PEAR.&lt;/p&gt;

&lt;p&gt;That's also where I'd say The PHP Anthology is unique, in it aims to get readers to avoid re-inventing wheels already done many times in PHP. Although many of the subjects have been seen before (often online), the focus here is either to use an Open Source class library or put one together, solving a problem once and for all, as opposed a hacked script that goes half way.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sample chapters from the books are available online, including an &lt;a href="http://www.sitepoint.com/article/php-anthology-2-5-caching/" title="The PHP Anthology Volume 2, Chapter 5 - Caching"&gt;excellent explanation of caching techniques&lt;/a&gt;. Harry is also one of my co-bloggers over at SitePoint where he writes about (you guessed it) &lt;acronym title="PHP: Hypertext Preprocessor"&gt;PHP&lt;/acronym&gt; in &lt;a href="http://www.sitepoint.com/blog-view.php?blogid=9" title="PHP Blog: Dynamically Typed"&gt;Dynamically Typed&lt;/a&gt;.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php"&gt;php&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/><category term="php"/></entry><entry><title>OOP over the top</title><link href="https://simonwillison.net/2003/Dec/11/oop/#atom-tag" rel="alternate"/><published>2003-12-11T02:50:02+00:00</published><updated>2003-12-11T02:50:02+00:00</updated><id>https://simonwillison.net/2003/Dec/11/oop/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.xmldatabases.org/WK/blog/1094_OOP_over_the_top.item"&gt;OOP over the top&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Using XML for data-driven programming


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;&lt;/p&gt;



</summary><category term="object-oriented-programming"/></entry><entry><title>How not to use OOP</title><link href="https://simonwillison.net/2003/Dec/5/dataDriven/#atom-tag" rel="alternate"/><published>2003-12-05T23:10:14+00:00</published><updated>2003-12-05T23:10:14+00:00</updated><id>https://simonwillison.net/2003/Dec/5/dataDriven/#atom-tag</id><summary type="html">
    &lt;p&gt;Via &lt;a href="http://zephyrfalcon.org/weblog/arch_d7_2003_11_29.html#e427" title="De kritiek van Hans"&gt;Hans Nowak&lt;/a&gt;, &lt;a href="http://csis.pace.edu/~bergin/patterns/ppoop.html"&gt;Understanding Object Oriented Programming&lt;/a&gt;, or how to turn 19 lines of easily maintained code in to an &lt;acronym title="Object Oriented"&gt;OO&lt;/acronym&gt; monstrosity spanning 7 class files. This is not the way to make code more maintainable. For comparison, here's how I would implement a solution to the same problem in Python, assuming the availability of an equivalent function to Java's &lt;code class="java"&gt;System.getProperty("os.name")&lt;/code&gt; (&lt;code class="python"&gt;os.name&lt;/code&gt; is similar but inappropriate for this example):&lt;/p&gt;

&lt;pre&gt;&lt;code class="python"&gt;MESSAGES = (
  ('SunOS', 'Linux'), 'This is a UNIX box and therefore good.'),
  ('Windows NT', Windows 95'), 'This is a Windows box and therefore bad.),
)
DEFAULT_MESSAGE = 'This is not a box.'

def get_os():
    name = System.getProperty("os.name")
    for names, message in MESSAGES:
        if name in names:
            return message
    return DEFAULT_MESSAGE

if __name__ == "__main__":
    print get_os()	
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In my book, smart data-driven programming beats over-engineered class-based programming any day of the week.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/></entry><entry><title>"Is Evil.." titles are evil</title><link href="https://simonwillison.net/2003/Sep/8/isEvil/#atom-tag" rel="alternate"/><published>2003-09-08T20:44:20+00:00</published><updated>2003-09-08T20:44:20+00:00</updated><id>https://simonwillison.net/2003/Sep/8/isEvil/#atom-tag</id><summary type="html">
    &lt;p&gt;Too excellent articles on Object Oriented Design: &lt;a href="http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html"&gt;Why extends is evil&lt;/a&gt; and &lt;a href="http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html"&gt;Why getter and setter methods are evil&lt;/a&gt;. Ignore the inflammatory titles: the subheading of the second article, "Make your code more maintainable by avoiding accessors", is a much better indication of their content. I picked up some great tips on proper use of &lt;acronym title="Object Oriented Programming"&gt;OOP&lt;/acronym&gt; from reading them. In particular, the &lt;a href="http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox-p3.html"&gt;section on CRC cards&lt;/a&gt; made something click which hadn't clicked when I looked at them earlier this year for my ill fated University software project.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/></entry><entry><title>PHP5 and Questioning OOP</title><link href="https://simonwillison.net/2003/Apr/11/moreOnPHP5andQuestioningOOP/#atom-tag" rel="alternate"/><published>2003-04-11T09:44:49+00:00</published><updated>2003-04-11T09:44:49+00:00</updated><id>https://simonwillison.net/2003/Apr/11/moreOnPHP5andQuestioningOOP/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;a href="http://www.php-con.com/2003/east/interviews/hughes.php"&gt;An Interview with Sterling Hughes on PHP5&lt;/a&gt; from the PHP-Con site:&lt;/p&gt;

&lt;blockquote cite="http://www.php-con.com/2003/east/interviews/hughes.php"&gt;&lt;p&gt;
Personally, while I have programmed with both C++ and Java, I am mostly a procedural guy. I feel that most object oriented programming consists of abstracting different problems into the same problem and then resolving that problem. Sure it makes it easier, but its incredibly inefficient for developing a small set of interconnected programs, which really is the whole point in web development.&lt;/p&gt;

&lt;p&gt;That's not to say I'm unhappy with PHP5. Most of the stuff in PHP5 is great, most notably exceptions; I'll certainly be taking advantage of many of the new features in Zend Engine 2. But most of my code is procedural, and Zend Engine 2 is mostly an object oriented functionality upgrade.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's the second time this week I've come across an opinion that questions the benefits of the &lt;acronym title="Object Oriented Programming"&gt;OOP&lt;/acronym&gt;-at-all-costs approach to programming. The first was in Paul Graham's &lt;a href="http://www.paulgraham.com/hundred.html"&gt;The Hundred Year Language&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote cite="http://www.paulgraham.com/hundred.html"&gt;&lt;p&gt;Somehow the idea of reusability got attached to object-oriented programming in the 1980s, and no amount of evidence to the contrary seems to be able to shake it free. But although some object-oriented software is reusable, what makes it reusable is its bottom-upness, not its object-orientedness. Consider libraries: they're reusable because they're language, whether they're written in an object-oriented style or not.&lt;/p&gt;

&lt;p&gt;I don't predict the demise of object-oriented programming, by the way. Though I don't think it has much to offer good programmers, except in certain specialized domains, it is irresistible to large organizations. Object-oriented programming offers a sustainable way to write spaghetti code. It lets you accrete programs as a series of patches. Large organizations always tend to develop software this way, and I expect this to be as true in a hundred years as it is today.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As undergraduates, we have been exposed to the joys of object oriented programming from our first week at Uni, possible because we're supposedly destined for the large organisations Paul mentions. It's nice to see the view from the other side of the fence for a change.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php"&gt;php&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php5"&gt;php5&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/><category term="php"/><category term="php5"/></entry><entry><title>PHP5 info from Sterling Hughes</title><link href="https://simonwillison.net/2003/Mar/23/php5InfoFromSterlingHughes/#atom-tag" rel="alternate"/><published>2003-03-23T16:05:54+00:00</published><updated>2003-03-23T16:05:54+00:00</updated><id>https://simonwillison.net/2003/Mar/23/php5InfoFromSterlingHughes/#atom-tag</id><summary type="html">
    &lt;p&gt;Sterling Hughes has &lt;a href="http://ny1.php.net/talks/show.php/php5intro" title="Introduction to PHP5: Slides"&gt;posted the slides&lt;/a&gt; he will be using for &lt;a href="http://www.edwardbear.org/blog/archives/000119.html" title="Introduction to PHP5: Blog entry"&gt;his presentation&lt;/a&gt; on &lt;acronym title="PHP: Hypertext Preprocessor"&gt;PHP&lt;/acronym&gt; 5 next week. They provide a great deal of insight in to the new additions to look forward to in &lt;acronym title="PHP: Hypertext Preprocessor"&gt;PHP&lt;/acronym&gt; 5, including a few I hadn't heard about before.&lt;/p&gt;

&lt;p&gt;One of the most instantly useful looking is &lt;a href="http://ny1.php.net/talks/show.php/php5intro/24"&gt;Class Autoloading&lt;/a&gt;. By creating a function called &lt;code&gt;__autoload()&lt;/code&gt; you can add logic to automatically include a class the first time it is called. The example code explains this much better:&lt;/p&gt;

&lt;blockquote cite="http://ny1.php.net/talks/show.php/php5intro/24"&gt;&lt;pre&gt;&lt;code&gt;
&amp;lt;?php
function __autoload($classname) {
    include_once("$classname.php");
}
$mono = new monkey;
$mono-&amp;gt;scratch();
?&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;acronym title="PHP: Hypertext Preprocessor"&gt;PHP&lt;/acronym&gt; 5 will also feature support for &lt;a href="http://ny1.php.net/talks/show.php/php5intro/13"&gt;class access control&lt;/a&gt;, &lt;a href="http://ny1.php.net/talks/show.php/php5intro/29"&gt;interfaces&lt;/a&gt; and &lt;a href="http://ny1.php.net/talks/show.php/php5intro/31"&gt;type hinting&lt;/a&gt; where a function or method can declare the type it expects for each of its arguments. It's sounding more and more like Java all the time, but seeing as all of the new support for stricter control are optional I don't see this as a disadvantage at all. Coders who want serious &lt;acronym title="Object Oriented Programming"&gt;OOP&lt;/acronym&gt; can have it, while people knocking out a quick script don't need to worry about them at all.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php"&gt;php&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php5"&gt;php5&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/><category term="php"/><category term="php5"/></entry><entry><title>Perl made less ugly</title><link href="https://simonwillison.net/2003/Jan/6/perlMadeLessUgly/#atom-tag" rel="alternate"/><published>2003-01-06T18:48:03+00:00</published><updated>2003-01-06T18:48:03+00:00</updated><id>https://simonwillison.net/2003/Jan/6/perlMadeLessUgly/#atom-tag</id><summary type="html">
    &lt;p&gt;It seems Perl &lt;acronym title="Object Oriented Programming"&gt;OOP&lt;/acronym&gt; doesn't have to be &lt;a href="/2003/Jan/04/crufty/"&gt;that ugly&lt;/a&gt; after all. &lt;cite&gt;Tony Bowden&lt;/cite&gt; &lt;a href="http://www.tmtm.com/nothing/archives/2003_01_05.html#000470" title="Camel Poop"&gt;disects&lt;/a&gt; the code from the recent Evolt article and shows how it can be made much neater using Perl's &lt;code&gt;Class::Accessor&lt;/code&gt; module. Much nicer - I should have guessed that there would be More Than One Way To Do It.&lt;/p&gt;

    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/></entry><entry><title>Voostind interview</title><link href="https://simonwillison.net/2002/Oct/10/voostindInterviewed/#atom-tag" rel="alternate"/><published>2002-10-10T14:20:19+00:00</published><updated>2002-10-10T14:20:19+00:00</updated><id>https://simonwillison.net/2002/Oct/10/voostindInterviewed/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;a href="http://www.devarticles.com/content.php?articleId=218&amp;amp;page=1"&gt;Virtual Interview: Vince Oostindie&lt;/a&gt; (via &lt;a href="http://techno-weenie.com/2002/10/08.php"&gt;techno weenie&lt;/a&gt;). Vincent is the author of the excellent &lt;a href="http://www.students.cs.uu.nl/people/voostind/eclipse/"&gt;Eclipse Library&lt;/a&gt; for PHP and a regular on the &lt;a href="http://www.sitepointforums.com/"&gt;SitePoint forums&lt;/a&gt;, where he frequently educates people in programming PHP using &lt;acronym title="Object-Oriented Programming"&gt;OOP&lt;/acronym&gt; methods. The interview is well worth a read if you are interested in either of these topics.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php"&gt;php&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/><category term="php"/></entry><entry><title>OOP and XP</title><link href="https://simonwillison.net/2002/Jun/20/oopAndXP/#atom-tag" rel="alternate"/><published>2002-06-20T13:22:39+00:00</published><updated>2002-06-20T13:22:39+00:00</updated><id>https://simonwillison.net/2002/Jun/20/oopAndXP/#atom-tag</id><summary type="html">
    &lt;p&gt;There's an &lt;a href="http://www.sitepointforums.com/showthread.php?threadid=61929&amp;amp;pagenumber=2" title="Coding Standards"&gt;interesting rambling thread&lt;/a&gt; on SitePoint at the moment which started off talking about coding standards but has moved on now to discussing OOP and eXtreme Programming. In it, I try to explain inheritance and the difference between &lt;code&gt;-&amp;gt;&lt;/code&gt; and &lt;code&gt;::&lt;/code&gt; while &lt;a href="http://www.students.cs.uu.nl/people/voostind/index.php"&gt;Vincent Oostindië&lt;/a&gt; explains the principle of refactoring from eXtreme Programming.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="object-oriented-programming"/></entry></feed>