Abstract
Method names with multiple separate parts are a feature of many dynamic languages derived from Smalltalk. Generalising the syntax of method names to allow parts to be repeated, optional, or alternatives, means a single definition can respond to a whole family of method requests. We show how generalising method names can support flexible APIs for domain-specific languages, complex initialisation tasks, and control structures defined in libraries. We describe how we have extended Grace to support generalised method names, and prove that such an extension can be integrated into a gradually-typed language while preserving type soundness.
- A UGUSTSSON, L., M ANSELL, H., AND S ITTAMPALAM, G. Paradise: a two-stage DSL embedded in Haskell. In ICFP (2008), pp. 225–228. Google Scholar
Digital Library
- B ENTLEY, J. Programming pearls: Little languages. CACM 29, 8 (Aug. 1986), 711–721. Google Scholar
Digital Library
- B ENZAKEN, V., C ASTAGNA, G., AND F RISCH, A. CDuce: An XML-centric general-purpose language. In ICFP (2003), pp. 51–63. Google Scholar
Digital Library
- B LACK, A. P., B RUCE, K. B., H OMER, M., AND N OBLE, J. Grace: the absence of (inessential) difficulty. In Onward! (2012), pp. 85–98. Google Scholar
Digital Library
- B RACHA, G., VON DER A H É, P., B YKOV, V., K ASHAI, Y., M ADDOX, W., AND M IRANDA 6, E. Modules as objects in Newspeak. In ECOOP (2010). Google Scholar
Digital Library
- B URMAKO, E., O DERSKY, M., V OGT, C., Z EIGER, S., AND M OORS, A. Scala macros. http://scalamacros.org, Apr. 2012.Google Scholar
- C OX, B. Object Oriented Programming: An Evolutionary Approach. Addison Wesley, 1991. Google Scholar
Digital Library
- C UCUMBER L TD. Cucumber. https://cucumber.io/.Google Scholar
- C ULPEPPER, R., T OBIN -H OCHSTADT, S., AND F LATT, M. Advanced macrology and the implementation of Typed Scheme. In ICFP workshop on Scheme and Functional Programming (2007).Google Scholar
- EPFL. Environment, universes, and mirrors - Scala documentation. http://docs.scala-lang.org/overviews/ reflection/environment-universes-mirrors.html, 2013.Google Scholar
- E RDWEG, S., R ENDEL, T., K ÄSTNER, C., AND O STER - MANN, K. SugarJ: Library-based syntactic language extensibility. In OOPSLA (2011). Google Scholar
Digital Library
- E RDWEG, S., R IEGER, F., R ENDEL, T., AND O STER - MANN, K. Layout-sensitive language extensibility with SugarHaskell. In HASKELL (2012), pp. 149–160. Google Scholar
Digital Library
- E RDWEG, S., VAN DER S TORM, T., V ÖLTER, M., B OERSMA, M., B OSMAN, R., C OOK, W., G ERRITSEN, A., H ULSHOUT, A., K ELLY, S., L OH, A., K ONAT, G., M OLINA, P., P ALATNIK, M., P OHJONEN, R., S CHINDLER, E., S CHINDLER, K., S OLMI, R., V ERGU, V., V ISSER, E., VAN DER V LIST, K., W ACHSMUTH, G., AND VAN DER W ONING, J. The state of the art in language workbenches. In Software Language Engineering, vol. 8225 of Lecture Notes in Computer Science. Springer International Publishing, 2013.Google Scholar
Cross Ref
- F INDLER, R. B., C LEMENTS, J., F LANAGAN, C., F LATT, M., K RISHNAMURTHI, S., S TECKLER, P., AND F ELLEISEN, M. DrScheme: a programming environment for Scheme. J. Funct. Program. 12, 2 (3 2002), 159–182. Google Scholar
Digital Library
- F OWLER, M. Domain Specific Languages. Addison-Wesley, 2011.Google Scholar
- F RISCH, A. OCaml + XDuce. In ICFP (2006), pp. 192–200. Google Scholar
Digital Library
- G AMMA, E., H ELM, R., J OHNSON, R. E., AND V LISSIDES, J. Design Patterns. Addison-Wesley, 1994.Google Scholar
- G IL, J. Y., AND L ENZ, K. Keyword- and defaultparameters in Java. Journal of Object Technology 11, 1 (2011), 1:1–17.Google Scholar
- H OLT, R. C., AND W ORTMAN, D. B. A sequence of structured subsets of PL/I. SIGCSE Bull. 6, 1 (Jan. 1974), 129–132. Google Scholar
Digital Library
- H OMER, M., J ONES, T., N OBLE, J., B RUCE, K. B., AND B LACK, A. P. Graceful dialects. In ECOOP (2014), pp. 131– 156.Google Scholar
- H OMER, M., AND N OBLE, J. A tile-based editor for a textual programming language. In Proceedings of IEEE Working Conference on Software Visualization (Sept 2013), VISSOFT’13, pp. 1–4.Google Scholar
- H OMER, M., AND N OBLE, J. Combining tiled and textual views of code. In Proceedings of IEEE Working Conference on Software Visualization (Sept 2014), VISSOFT’14. Google Scholar
Digital Library
- H OMER, M., N OBLE, J., B RUCE, K. B., B LACK, A. P. ., AND P EARCE, D. J. Patterns as objects in Grace. In DLS (2012), pp. 17–28. Google Scholar
Digital Library
- H OSOYA, H., V OUILLON, J., AND P IERCE, B. C. Regular expression types for XML. In ICFP (2000), pp. 11–22. Google Scholar
Digital Library
- I NGALLS, D. H. H. The Smalltalk-76 programming system design and implementation. In POPL (1978). Google Scholar
Digital Library
- J ONES, M. P. Experience report: playing the DSL card. In ICFP (2008). Google Scholar
Digital Library
- J ONES, T., AND N OBLE, J. Tinygrace: A simple, safe and structurally typed language. In FTFJP (2014). Google Scholar
Digital Library
- K ATS, L. C., AND V ISSER, E. The Spoofax language workbench: rules for declarative specification of languages and IDEs. In OOPSLA (2010). Google Scholar
Digital Library
- K LINT, P., V AN D ER S TORM, T., AND V INJU, J. Rascal: A domain specific language for source code analysis and manipulation. In SCAM (2009), pp. 168–177. Google Scholar
Digital Library
- L ORENZ, D. H., AND R OSENAN, B. Cedalion: a language for language oriented programming. In OOPSLA (Oct. 2011). Google Scholar
Digital Library
- M EIJER, E., B ECKMAN, B., AND B IERMAN, G. LINQ: Reconciling object, relations and XML in the .NET framework. In SIGMOD (2006), pp. 706–706. Google Scholar
Digital Library
- M OON, D., S TALLMAN, R., AND W EINREB, D. The Lisp Machine Manual, third ed. MIT AI Lab, 1981. Google Scholar
Digital Library
- O DERSKY, M. The Scala language specification. Tech. rep., Programming Methods Laboratory, EPFL, 2011.Google Scholar
- R EM O BJECTS S OFTWARE. The Oxygene language. elementscompiler.com/elements/oxygene/, 2015.Google Scholar
- R OMPF, T., AND O DERSKY, M. Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs. In GPCE (2010), pp. 127–136. Google Scholar
Digital Library
- T OBIN -H OCHSTADT, S., S T -A MOUR, V., C ULPEPPER, R., F LATT, M., AND F ELLEISEN, M. Languages as libraries. In PLDI (2011). Google Scholar
Digital Library
- T ORGERSEN, M. Querying in C#: How language integrated query (LINQ) works. In OOPSLA Companion (2007). Google Scholar
Digital Library
- U NGAR, D., AND S MITH, R. B. SELF: the Power of Simplicity. Lisp and Symbolic Computation 4, 3 (June 1991). Google Scholar
Digital Library
- V OELTER, M. DSL Engineering: Designing, Implementing and Using Domain-Specific Languages. dslbook.org, 2013.Google Scholar
Index Terms
From APIs to languages: generalising method names
Recommendations
From APIs to languages: generalising method names
DLS 2015: Proceedings of the 11th Symposium on Dynamic LanguagesMethod names with multiple separate parts are a feature of many dynamic languages derived from Smalltalk. Generalising the syntax of method names to allow parts to be repeated, optional, or alternatives, means a single definition can respond to a whole ...
Tagless staged interpreters for typed languages
Multi-stage programming languages provide a convenient notation for explicitly staging programs. Staging a definitional interpreter for a domain specific language is one way of deriving an implementation that is both readable and efficient. In an ...
Tagless staged interpreters for typed languages
ICFP '02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programmingMulti-stage programming languages provide a convenient notation for explicitly staging programs. Staging a definitional interpreter for a domain specific language is one way of deriving an implementation that is both readable and efficient. In an ...






Comments