Skip to main content

Daniel Jomphe's Library tagged comparison   View Popular

17 Jun 09

Why? Language Archaeology ... and Metaprogramming

  • Python also felt the pressure to support metaprogramming, which began to appear in 2.x versions of the language in the form of metaclasses. Metaclasses turned out to be (like AOP in Java) too much of a mental shift to allow easy use by mainstream Python programmers, so in the most recent versions of Python, decorators were added. These are similar in syntax to Java annotations, but more powerful in use, primarily because Python is as fungible as Ruby. What's interesting is that the intermediate step of actually applying the decorator turns out to be less of an intrusion, (as it might initially appear) but rather a beneficial annotation that makes the code more understandable. Indeed, one of the main problems with metaclasses (other than the complexity) was that you couldn't easily see by looking at the code what it does; you had to know that the magic had been folded in because of the metaclass. Whereas, with decorators, it is clear that metaprogramming actions are being applied to a function or class.


    Although we haven't seen an explosion in the creation of DSLs in Python as we have in Ruby (it's certainly possible to create DSLs in Python), decorators provide an interesting alternative: instead of creating an entirely new language syntax, you can create a decorated version of Python. Although this might not be tightly targeted to domain users as DSLs are, it has the benefit of being more easily understandable to someone who is already familiar with Python (rather than learning a new syntax for each DSL).

12 Jun 09

The Lambda Complex

  • Programming languages such as
    C/C++/Java/Python are called imperative programming languages
    because they consist of sequences of actions. The programmer tells
    the computer how to perform a task, step-by-step.
  • There are two areas that are fundamental to programming a computer
    - resource management and sequencing.
  • 12 more annotations...
09 Jun 09

defmacro - Functional Programming For The Rest of Us

  • mailbox
  • Programmers are procrastinators.
  • 81 more annotations...

Clojure for the Semantic Web - Digital Digressions by Stuart Sierra

  • The first thing Rich did when experimenting with the semantic web was to pull data out of the Jena API and get it into Clojure data structures.  That allows him to leverage the full power of Clojure’s data manipulation functions.  This opens up a world of possibilities that he wouldn’t have if he stuck with Jena objects.  Basically, having your data trapped inside objects is bad, because you’re limited to whatever methods those objects provide.  With generic data structures, you can re-use and compose all the functions that Clojure already provides.
24 Apr 09

DVCSAnalysis - support - Analysis of Git and Mercurial - Google Code

  • Based on popularity, two distributed version control systems were considered: Git and Mercurial.
  • One key feature of any DVCS system is to make it easy for repositories to unambiguously describe the history they have (and the history they are requesting). Both Git and Mercurial do this by using SHA1 hashes to identify data (files, trees, changesets, etc).
  • 16 more annotations...
22 Apr 09

Relevance Blog : Why I still prefer Prototype to jQuery

  • I knew JavaScript pretty well before I started working with Prototype, and was very pleased by how the library filled in some of the weak spots in the language.
  • But increasingly the voices favoring jQuery have included people I really respect, including (over the past few months) several of my colleagues here at Relevance.
  • 43 more annotations...
1 - 20 of 306 Next › Last »
Showing 20 items per page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo