Presentation is loading. Please wait.

Presentation is loading. Please wait.

Libraries in touch develop Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet.

Similar presentations


Presentation on theme: "Libraries in touch develop Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet."— Presentation transcript:

1 libraries in touch develop Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and Windows Live are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners.

2 goals o code reuse o enabling collaboration between users o generic collection types o encapsulation

3 visibility o “my script” can reference a library script “foo v1.0” under the name “foo” o public action “frobnicate” from “foo v1.0” is visible as “foo→frobnicate” in “my script” o global variables, events, art, and private actions are not visible outside defining library script

4 sharing o the same library script can be referenced multiple times giving it multiple copies of global variables and tables o “my script” references libraries “nice circle” and “super square” which in turn both reference “logo turtle” “my script” decides if there is one or two copies of “logo turtle” (and thus one or two turtles running around on the screen)

5 sharing in ui circlesquare loc_turtle

6 rebinding o if “nice circle” and “super square” reference slightly different versions of “logo turtle” they can still be bound to one in “my script” if signatures match there is no problem otherwise rebinding of particular actions is possible

7 rebinding in ui default binding rebound

8 funtors o they are like ML functors but much more fun o main script controls dependencies of referenced libraries which makes them parametric lib #0 main script lib #1lib #2 o references can be resolved back into main script

9 funtor details o required signatures are implicit o funtor parameters come with defaults you can replace actions in referenced libraries, but if you don’t, there always the default implementation


Download ppt "Libraries in touch develop Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet."

Similar presentations


Ads by Google