Your browser does not support JavaScript!
http://iet.metastore.ingenta.com
1887

Including both static and dynamic typing in the same programming language

Including both static and dynamic typing in the same programming language

For access to this article, please select a purchase option:

Buy article PDF
£12.50
(plus tax if applicable)
Buy Knowledge Pack
10 articles for £75.00
(plus taxes if applicable)

IET members benefit from discounts to all IET publications and free access to E&T Magazine. If you are an IET member, log in to your account and the discounts will automatically be applied.

Learn more about IET membership 

Recommend Title Publication to library

You must fill out fields marked with: *

Librarian details
Name:*
Email:*
Your details
Name:*
Email:*
Department:*
Why are you recommending this title?
Select reason:
 
 
 
 
 
IET Software — Recommend this title to your library

Thank you

Your recommendation has been sent to your librarian.

Dynamic languages are becoming increasingly popular for different software development scenarios such as Web engineering, rapid prototyping or the construction of applications that require runtime adaptiveness. These languages are built on the idea of supporting reasoning about (and customising) program structure, behaviour and environment at runtime. The dynamism offered by dynamic languages is, however, counteracted by two main limitations: no early type error detection and fewer opportunities for compiler optimisations. To obtain the benefits of both dynamically and statically typed languages, the authors have designed the StaDyn programming language that provides both approaches. StaDyn keeps gathering-type information at compile time, even when dynamic variables are used. This type information is used to offer early type error detection, direct interoperation between static and dynamic codes and better runtime performance. Following the Separation of Concerns principle, it is possible to customise the trade-off between runtime flexibility of dynamic typing and safety, performance and robustness of static typing. A runtime performance assessment is presented to show an estimate of the benefits of combining dynamic and static typing in the same programming language.

References

    1. 1)
      • D. Thomas , C. Fowler , A. Hunt . (2004) Programming ruby.
    2. 2)
      • Meijer, E., Drayton, P.: `Dynamic typing when needed: the end of the cold war between programming languages', Proc. OOPSLA Workshop on Revival of Dynamic Languages, 2004.
    3. 3)
      • Thatte, S.: `Quasi-static typing', Proc. ACM Symp. on Principles of Programming Languages, 1990.
    4. 4)
      • B.C. Pierce . (2002) Types and programming languages.
    5. 5)
      • L. Cardelli . Basic Polymorphic Typechecking. Sci. Comput. Program. , 147 - 172
    6. 6)
      • Ortin, F.: `The StaDyn core type system', Technical Report, August 2009, Computer Science Department, University of Oviedo, available at www.reflection.uniovi.es/stadyn/publications/stadyn.core.type.system.pdf.
    7. 7)
      • F. Ortin , D. Zapico , J.M. Cueva . Design patterns for teaching type checking in a compiler construction course. IEEE Trans. Educ. , 3 , 273 - 283
    8. 8)
      • Emami, M., Ghiya, R., Hendren, L.: `Context-sensitive inter-procedural points-to analysis in the presence of function pointers', Proc. ACM SIGPLAN'94 Conf. on Programming Language Design and Implementation, 1994, p. 242–256.
    9. 9)
      • JSR 292: ‘Supporting dynamically typed languages on the Java platform’. www.jcp.org/en/jsr/detail?id=292.
    10. 10)
      • Plevyak, J., Chien, A.A.: `Precise concrete type inference for object-oriented languages', SIGPLAN Notices 29, 10, Proc. OOPSLA Conf., 1994, p. 324–340.
    11. 11)
      • Django, the Web framework for perfectionists with deadlines: www.djangoproject.com, accessed September 2009.
    12. 12)
      • Hugunin, J.: `Just Glue It! Ruby and the DLR in silverlight', MIX Conf., 2007.
    13. 13)
      • Odersky, M., Cremet, V., Röckl, C., Zenger, M.: `A nominal theory of objects with dependent types', Eur. Conf. on Object-Oriented Programming, 2002, p. 201–224.
    14. 14)
      • Böllert, K.: `On weaving aspects', Eur. Conf. on Object-Oriented Programming (ECOOP), Workshop on Aspect Oriented Programming, 1999, p. 301–302.
    15. 15)
      • Pierce, B.C.: `Programming with intersection types, union types, and polymorphism', Technical Report CMU-CS-91-106, 1991, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA.
    16. 16)
      • F. Ortin , J.M. Redondo , J.B.G. Perez-Schofield . Efficient virtual machine support of runtime structural reflection. Sci. Comput. Program , 10 , 836 - 860
    17. 17)
      • Boo home page: http://boo.codehaus.org, accessed September 2009.
    18. 18)
      • R. Milner . A theory of type polymorphism in programming. J. Comput. Syst. Sci. , 3 , 348 - 375
    19. 19)
      • Flanagan, C., Freund, S.N., Tomb, A.: `Hybrid types, invariants, and refinements for imperative objects', Int. Workshop Foundations and Developments of Object-Oriented Languages, 2006.
    20. 20)
      • A. Latteier , M. Pelletier , C. McDonough , P. Sabaini . (2008) The Zope Book.
    21. 21)
      • Landi, W., Ryder, B.G.: `A safe approximate algorithm for interprocedural pointer aliasing', Conf. on Programming Language Design and Implementation, 1992, p. 473–489.
    22. 22)
      • Freeman, T., Pfenning, F.: `Refinement types for ML', Proc. ACM SIGPLAN 1991 Conf. on Programming Language Design and Implementation, 1991, Toronto, Ontario, Canada, p. 268–277.
    23. 23)
      • Abadi, M., Cardelli, L., Pierce, B.C., Plotkin, G.: `Dynamic typing in polymorphic languages', SRC Research Report 120, 1994, Digital.
    24. 24)
    25. 25)
      • F. Buschmann . (1996) Pattern-oriented software architecture, a system of patterns.
    26. 26)
      • J.M. Redondo , F. Ortin , J.M. Cueva . Optimising reflective primitives of dynamic languages. Int. J. Softw. Eng. Knowledge Eng. , 6 , 759 - 783
    27. 27)
      • Ierusalimschy, R., de Figueiredo, L.H., Celes, W.: `The evolution Lua', Proc. 3rd ACM SIGPLAN Conf. on History of Programming Languages, 2007, p. 1–26.
    28. 28)
      • Hudak, P., Jones, S.P., Wadler, P.: `Report on the programming language Haskell version 1.1', Technical, 1991, Departments of Computer Science, University of Glasgow and Yale University.
    29. 29)
      • P. Vick . (2007) The microsoft visual basic language specification.
    30. 30)
      • G. van Rossum , L. Fred , J.R. Drake . (2003) The Python Language Reference Manual.
    31. 31)
      • JSR 223: ‘Scripting for the Java platform’. www.jcp.org/en/jsr/detail?id=223.
    32. 32)
      • R. Milner , M. Tofte , R. Harper . (1990) The definition of standard ML.
    33. 33)
      • Diwan, A., McKinley, K.S., Moss, J.E.B.: `Type-based alias analysis', SIGPLAN Conf. on Programming Language Design and Implementation, 1998, p. 106–117.
    34. 34)
      • Bracha, G., Griswold, D.: `Strongtalk: typechecking smalltalk in a production environment', Proc. OOPSLA'93 Conf. on Object-Oriented Programming Systems, Languages and Applications, 1993, p. 215–230.
    35. 35)
      • Canning, P., Cook, W., Hill, W., Olthoff, W., Mitchell, J.C.: `F-bounded polymorphism for object-oriented programming', Proc. 4th Int. Conf. on Functional Programming Languages and Computer Architecture, 1989, p. 273–280.
    36. 36)
      • A. Shalit . (1996) The Dylan reference manual: the definitive guide to the new object-oriented dynamic language.
    37. 37)
      • ‘The C# 3.0 language specification’. Microsoft Developer Network, http://download.microsoft.com/download/3/8/8/388e7205-bc10-4226-b2a8-75351c669b09/CSharp\%20Language\%20Specification.doc.
    38. 38)
      • T. Parr . (2007) The definitive ANTLR reference: building domain-specific languages.
    39. 39)
      • D. Watt , D. Brown . (2000) Programming language processors in Java: compilers and interpreters.
    40. 40)
      • M. Abadi , L. Cardelli , B.C. Pierce , G. Plotkin . Dynamic typing in a statically typed language. ACM Trans. Program. Lang. Syst. , 2 , 237 - 268
    41. 41)
      • A. Hunt , D. Thomas . (2000) The pragmatic programmer.
    42. 42)
      • L. Cardelli . (1997) Type systems.
    43. 43)
      • Bracha, G.: `Pluggable type systems', OOPSLA Workshop on Revival of Dynamic Languages, October 2004.
    44. 44)
      • Flanagan, C., Flatt, M., Krishnamurthi, S., Weirich, S., Felleisen, M.: `Catching bugs in the web of program invariants', Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, 1996.
    45. 45)
      • E. Gamma , R. Helm , R. Johnson , J.M. Vlissides . (1994) Design patterns: elements of reusable object-oriented software.
    46. 46)
      • M. Odersky , M. Sulzmann , M. Wehr . Type inference with constrained types. Theory Pract. Object Syst.
    47. 47)
      • Siek, J., Taha, W.: `Gradual typing for objects', Proc. 21st Eur. Conf. on Object-Oriented Programing, Lecture Notes In Computer Science, vol. 4609, 2007.
    48. 48)
      • Cartwright, R., Fagan, M.: `Soft typing', Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, 1991.
    49. 49)
      • D. Crane , E. Pascarello , D. James . (2005) Ajax in action.
    50. 50)
      • N. Haldiman , M. Denker , O. Nierstrasz . Practical, pluggable types for a dynamic language. Comput. Lang. Syst. Struct. , 1 , 48 - 62
    51. 51)
      • Siek, J., Vachharajani, M.: `Gradual typing with unification-based inference', Proc. Symp. on Dynamic Languages, 2008.
    52. 52)
      • D. Rémy , J. Vouillon . Objective ML: ‘An effective object-oriented extension to ML. Theory Pract. Object Syst. , 1 , 27 - 50
    53. 53)
      • R. Ierusalimschy , L.H. de Figueiredo , W.C. Filho . Lua –an extensible extension language. Softw.-Pract. Exp. , 6 , 635 - 652
    54. 54)
      • R. Cytron , J. Ferrante , B.K. Rosen , M.N. Wegman , F.K. Zadeck . Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Program. Lang. Syst. , 4 , 451 - 490
    55. 55)
      • D. Thomas , D.H. Hansson , A. Schwarz , T. Fuchs , L. Breed , M. Clark . (2005) Agile web development with rails. A pragmatic guide.
    56. 56)
      • ‘The Da Vinci Machine, a multi-language renaissance for the Java Virtual Machine architecture’. Sun Microsystems OpenJDK. http://openjdk.java.net/projects/mlvm.
    57. 57)
      • The Pythius website: http://pythius.sourceforge.net, accessed September 2009.
    58. 58)
      • Hürsch, W.L., Lopes, C.V.: `Separation of concerns', Technical Report UN-CCS-95-03, 1995, Northeastern University, Boston, USA.
    59. 59)
      • A. Goldberg , D. Robson . (1983) Smalltalk-80: the language and its implementation.
    60. 60)
      • (2005) ECMA-357: ‘ECMAScript for XML (E4X) specification.
    61. 61)
      • M. Torgersen . (2009) New features in C# 4.0.
    62. 62)
      • A.W. Appel . (1998) Modern compiler implementation in ML.
http://iet.metastore.ingenta.com/content/journals/10.1049/iet-sen.2009.0070
Loading

Related content

content/journals/10.1049/iet-sen.2009.0070
pub_keyword,iet_inspecKeyword,pub_concept
6
6
Loading
This is a required field
Please enter a valid email address