
Implementing an object using swift closures and tuples - omarsubhi
I just published a post that explains how to use closures and their contexts to imitate an object. In this post I try to show how the closure captured context can be used to imitate an instance variable in a oo class.<p>http:&#x2F;&#x2F;nsomar.com&#x2F;implementing-an-object-using-swift-closures-and-tuples&#x2F;
======
brudgers
It looks interesting, but would best be submitted as a direct link.

The Hacker News |submit| page will create a story with either:

    
    
      the link in the |url| field
        or
      the contents in the |text| field
    

But not both. If both the |url| and |text| fields have contents, the |submit|
page defaults to the content of the |text| field. This means:

1\. If the |text| field is empty, the |url| field will create a linked story.

2\. If the |text| field is not empty, the contents of the |url| field will be
ignored and the story will be created using _only_ the contents of the |text|
field. The contents of the |url| field will be ignored.

Good luck.

