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 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)
      • D. Thomas , D.H. Hansson , A. Schwarz , T. Fuchs , L. Breed , M. Clark . (2005) Agile web development with rails. A pragmatic guide.
    3. 3)
      • A. Hunt , D. Thomas . (2000) The pragmatic programmer.
    4. 4)
      • (2005) ECMA-357: ‘ECMAScript for XML (E4X) specification.
    5. 5)
      • D. Crane , E. Pascarello , D. James . (2005) Ajax in action.
    6. 6)
      • G. van Rossum , L. Fred , J.R. Drake . (2003) The Python Language Reference Manual.
    7. 7)
      • A. Latteier , M. Pelletier , C. McDonough , P. Sabaini . (2008) The Zope Book.
    8. 8)
      • Django, the Web framework for perfectionists with deadlines: www.djangoproject.com, accessed September 2009.
    9. 9)
      • R. Ierusalimschy , L.H. de Figueiredo , W.C. Filho . Lua –an extensible extension language. Softw.-Pract. Exp. , 6 , 635 - 652
    10. 10)
      • 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.
    11. 11)
      • The Pythius website: http://pythius.sourceforge.net, accessed September 2009.
    12. 12)
      • Böllert, K.: `On weaving aspects', Eur. Conf. on Object-Oriented Programming (ECOOP), Workshop on Aspect Oriented Programming, 1999, p. 301–302.
    13. 13)
    14. 14)
      • JSR 223: ‘Scripting for the Java platform’. www.jcp.org/en/jsr/detail?id=223.
    15. 15)
      • JSR 292: ‘Supporting dynamically typed languages on the Java platform’. www.jcp.org/en/jsr/detail?id=292.
    16. 16)
      • ‘The Da Vinci Machine, a multi-language renaissance for the Java Virtual Machine architecture’. Sun Microsystems OpenJDK. http://openjdk.java.net/projects/mlvm.
    17. 17)
      • Hugunin, J.: `Just Glue It! Ruby and the DLR in silverlight', MIX Conf., 2007.
    18. 18)
      • M. Torgersen . (2009) New features in C# 4.0.
    19. 19)
      • B.C. Pierce . (2002) Types and programming languages.
    20. 20)
      • 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.
    21. 21)
      • M. Abadi , L. Cardelli , B.C. Pierce , G. Plotkin . Dynamic typing in a statically typed language. ACM Trans. Program. Lang. Syst. , 2 , 237 - 268
    22. 22)
      • Abadi, M., Cardelli, L., Pierce, B.C., Plotkin, G.: `Dynamic typing in polymorphic languages', SRC Research Report 120, 1994, Digital.
    23. 23)
      • Hürsch, W.L., Lopes, C.V.: `Separation of concerns', Technical Report UN-CCS-95-03, 1995, Northeastern University, Boston, USA.
    24. 24)
      • L. Cardelli . (1997) Type systems.
    25. 25)
      • 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.
    26. 26)
      • ‘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.
    27. 27)
      • R. Milner , M. Tofte , R. Harper . (1990) The definition of standard ML.
    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)
      • L. Cardelli . Basic Polymorphic Typechecking. Sci. Comput. Program. , 147 - 172
    30. 30)
      • R. Milner . A theory of type polymorphism in programming. J. Comput. Syst. Sci. , 3 , 348 - 375
    31. 31)
      • 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
    32. 32)
      • E. Gamma , R. Helm , R. Johnson , J.M. Vlissides . (1994) Design patterns: elements of reusable object-oriented software.
    33. 33)
      • 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.
    34. 34)
      • D. Rémy , J. Vouillon . Objective ML: ‘An effective object-oriented extension to ML. Theory Pract. Object Syst. , 1 , 27 - 50
    35. 35)
      • 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.
    36. 36)
      • Plevyak, J., Chien, A.A.: `Precise concrete type inference for object-oriented languages', SIGPLAN Notices 29, 10, Proc. OOPSLA Conf., 1994, p. 324–340.
    37. 37)
      • 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.
    38. 38)
      • Bracha, G.: `Pluggable type systems', OOPSLA Workshop on Revival of Dynamic Languages, October 2004.
    39. 39)
      • N. Haldiman , M. Denker , O. Nierstrasz . Practical, pluggable types for a dynamic language. Comput. Lang. Syst. Struct. , 1 , 48 - 62
    40. 40)
      • 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.
    41. 41)
      • M. Odersky , M. Sulzmann , M. Wehr . Type inference with constrained types. Theory Pract. Object Syst.
    42. 42)
      • Landi, W., Ryder, B.G.: `A safe approximate algorithm for interprocedural pointer aliasing', Conf. on Programming Language Design and Implementation, 1992, p. 473–489.
    43. 43)
      • 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.
    44. 44)
      • 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.
    45. 45)
      • A.W. Appel . (1998) Modern compiler implementation in ML.
    46. 46)
      • F. Buschmann . (1996) Pattern-oriented software architecture, a system of patterns.
    47. 47)
      • T. Parr . (2007) The definitive ANTLR reference: building domain-specific languages.
    48. 48)
      • D. Watt , D. Brown . (2000) Programming language processors in Java: compilers and interpreters.
    49. 49)
      • F. Ortin , D. Zapico , J.M. Cueva . Design patterns for teaching type checking in a compiler construction course. IEEE Trans. Educ. , 3 , 273 - 283
    50. 50)
      • J.M. Redondo , F. Ortin , J.M. Cueva . Optimising reflective primitives of dynamic languages. Int. J. Softw. Eng. Knowledge Eng. , 6 , 759 - 783
    51. 51)
      • F. Ortin , J.M. Redondo , J.B.G. Perez-Schofield . Efficient virtual machine support of runtime structural reflection. Sci. Comput. Program , 10 , 836 - 860
    52. 52)
      • 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.
    53. 53)
      • A. Goldberg , D. Robson . (1983) Smalltalk-80: the language and its implementation.
    54. 54)
      • A. Shalit . (1996) The Dylan reference manual: the definitive guide to the new object-oriented dynamic language.
    55. 55)
      • P. Vick . (2007) The microsoft visual basic language specification.
    56. 56)
      • Boo home page: http://boo.codehaus.org, accessed September 2009.
    57. 57)
      • Cartwright, R., Fagan, M.: `Soft typing', Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, 1991.
    58. 58)
      • 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.
    59. 59)
      • Thatte, S.: `Quasi-static typing', Proc. ACM Symp. on Principles of Programming Languages, 1990.
    60. 60)
      • 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.
    61. 61)
      • Siek, J., Taha, W.: `Gradual typing for objects', Proc. 21st Eur. Conf. on Object-Oriented Programing, Lecture Notes In Computer Science, vol. 4609, 2007.
    62. 62)
      • Siek, J., Vachharajani, M.: `Gradual typing with unification-based inference', Proc. Symp. on Dynamic Languages, 2008.
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