<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Passing Curiosity: Posts tagged programming languages</title>
    <link href="https://passingcuriosity.com/tags/programming-languages/programming-languages.xml" rel="self" />
    <link href="https://passingcuriosity.com" />
    <id>https://passingcuriosity.com/tags/programming-languages/programming-languages.xml</id>
    <author>
        <name>Thomas Sutton</name>
        
        <email>me@thomas-sutton.id.au</email>
        
    </author>
    <updated>2012-08-18T00:00:00Z</updated>
    <entry>
    <title>PyconAU 2012: Python's dark corners</title>
    <link href="https://passingcuriosity.com/2012/dark-corners/" />
    <id>https://passingcuriosity.com/2012/dark-corners/</id>
    <published>2012-08-18T00:00:00Z</published>
    <updated>2012-08-18T00:00:00Z</updated>
    <summary type="html"><![CDATA[<p>Peter Lovett is a programmer and trainer.</p>
<p>Python’s dark corners. Covering 2.x with a few tips on 3; things to avoid,
etc. Python is a fantastic language but it’s not perfect and there are a few
dark corners which need to be worked around.</p>
<p>Python is a deceptively simple language: the surface simplicity hides a deal
of complexity.</p>
<p>Reference to the algorithmic trading incident.</p>
<h3 id="oo">OO</h3>
<p>Python really is object oriented. This has a few more implications: “modules”
and functions are first-class.</p>
<h3 id="references">References</h3>
<p>Python uses references by default. Use <code>is</code> for reference equality, not <code>==</code>.
Some types (int, tuple, etc) are immutable.</p>
<p>Rebinding is sometimes an accident. When of a built-in, it’s often
catastrophic. Use <code>__builtin__</code> to get these things back.</p>
<p>Pass by reference is the default (and only option). The only pass by value is
to copy it. Lots of options for lists (slice <code>[:]</code>), the <code>copy</code> module.</p>
<h3 id="operators">Operators</h3>
<p>No <code>++</code> or <code>--</code> operators. “Mutating” operators are designed so as not to be
mutating: <code>+=</code>, etc. rather than <code>++</code>.</p>
<h3 id="typing">Typing</h3>
<p>If you’re checking types, you’re doing it wrong. “Duck typing”. #sigh</p>
<h3 id="numerics">Numerics</h3>
<p>Floating point arithmetic is floating point arithmetic.</p>
<h3 id="tuples">Tuples</h3>
<p>Immutable, but only the tuple itself (i.e. the references it contains, not
their referents).</p>
<h3 id="arguments">Arguments</h3>
<ul>
<li><p>Support both ordinal and keyword parameters.</p></li>
<li><p>Default values. Default values are created at load time, so should probably
be immutable.</p></li>
</ul>
<h3 id="namespaces">Namespaces</h3>
<p>Scoping: scoping of variables is based on use within the scope, not dynamic.</p>
<p>Visibility of globals. Better to just avoid variables in global scope.</p>]]></summary>
</entry>
<entry>
    <title>Permission-based ownership: encapsulating state in higher-order typed languages</title>
    <link href="https://passingcuriosity.com/2006/permission-based-ownership-encapsulating-state-in-higher-order-typed-languages/" />
    <id>https://passingcuriosity.com/2006/permission-based-ownership-encapsulating-state-in-higher-order-typed-languages/</id>
    <published>2006-03-31T00:00:00Z</published>
    <updated>2006-03-31T00:00:00Z</updated>
    <summary type="html"><![CDATA[<p><a href="http://www.cs.cmu.edu/~aldrich/papers/pldi05.pdf">Permission-based ownership: encapsulating state in higher-order typed
languages</a> by Neel Krishnaswami and Jonathan Aldrich. In PLDI’05.</p>
<p>I’m still puzzling through the examples, but it looks pretty cool. The
essential idea is to use the type system (an extension of <acronym>System
F</acronym> with references and ownership called <acronym>System
F<sub><i>own</i></sub></acronym>) to ensure that the internal details of
modules cannot be messed with.</p>
<p>They give an illustrative example involving customers in one domain, banking
machinery in a second and account details in a third. The customers are allowed
to call the banking machinery, and the banking machinery can access the account
details, and all other access is invalid. The goal of <acronym>System
F<sub><i>own</i></sub></acronym> is to prove these sorts of properties.</p>
<ul>
<li><a href="http://portal.acm.org/citation.cfm?id=1065023">ACM</a></li>
<li><a href="http://scholar.google.com/scholar?hl=en&lr=&safe=off&cluster=17777635342074588239">Google</a></li>
<li><a href="http://www.citeulike.org/article/471760">CiteULike</a></li>
</ul>]]></summary>
</entry>
<entry>
    <title>Interpreting the Data: Parallel Analysis with Sawzall (Draft)</title>
    <link href="https://passingcuriosity.com/2006/interpreting-the-data-parallel-analysis-with-sawzall-draft/" />
    <id>https://passingcuriosity.com/2006/interpreting-the-data-parallel-analysis-with-sawzall-draft/</id>
    <published>2006-02-26T00:00:00Z</published>
    <updated>2006-02-26T00:00:00Z</updated>
    <summary type="html"><![CDATA[<p><a class="title" href="http://labs.google.com/papers/sawzall.html" title="Interpreting the Data: Parallel Analysis with Sawzall (Draft)">Interpreting the Data: Parallel Analysis with Sawzall (Draft)</a></p>
<p>While <a href="http://labs.google.com/papers/mapreduce.html" title="MapReduce: Simplified Data Processing on Large Clusters">MapReduce</a> and <a href="http://labs.google.com/papers/gfs.html" title="The Google File System">GFS</a> allow Google to use their massive computer <a href="http://labs.google.com/papers/googlecluster.html" title="Web Search for a Planet: The Google Cluster Architecture">clusters</a> effectively, the use of C++ can make programming for such a systems more difficult than it needs to be. Cue Sawzall, a new language that Google use to write distributed, parallel data-processing programs for use on their clusters. While the language isn’t particularly attractive (I’ve never liked C-style syntax’s), the approach is very interesting and the implementation issues they describe are enlightening.</p>
<p><a href="http://lambda-the-ultimate.org/node/916">LtU</a> | <a href="http://www.citeulike.org/article/227597">CiteULike</a></p>]]></summary>
</entry>
<entry>
    <title>Books, Glorious Books</title>
    <link href="https://passingcuriosity.com/2005/books-glorious-books/" />
    <id>https://passingcuriosity.com/2005/books-glorious-books/</id>
    <published>2005-04-14T00:00:00Z</published>
    <updated>2005-04-14T00:00:00Z</updated>
    <summary type="html"><![CDATA[<p>One field of Computer Science I am particularly interested in is programming
languages. In a probably futile attempt to speed my learning in this area,
I ordered a few books from <a href="http://www.coop-bookshop.com.au/">The Coop Bookshop</a> the other day. I chose the
books based on the various recommendation on the <a href="http://lambda-the-ultimate.org/">Lambda the Ultimate</a>
weblog forums (adjusted by price, availability, and recency of publishing).</p>
<p>After a bit of um-ing and ah-ing, I finally settled on Benjamin Pierce’s <a href="http://www.amazon.com/dp/0262162091/">Types
and Programming Languages</a>, Peter Seibel’s <a href="http://www.amazon.com/dp/143021161X/">Practical Common Lisp</a> and
<a href="http://www.amazon.com/dp/0262220695/">Concepts, Techniques and Models of Computer Programming</a> by Peter Van Roy
and Seif Haridi.</p>
<p>That’s a bit of $300-worth of books, so I hope to get around to reading them at
some point between when they arrive (somewhere between a week and a month away,
I imagine) and the end of the year.</p>
<p>Suggestions of other books suitable for beginners in the areas of type systems,
programming language theory, and related fields are most welcome in the
comments.</p>]]></summary>
</entry>

</feed>
