Results 1 -
6 of
6
Implicit parameters: dynamic scoping with static types
- In POPL’00
, 2000
"... This paper introduces a language feature, called implicit parameters, that provides dynamically scoped variables within a statically-typed Hindley-Milner framework. Implicit parameters are lexically distinct from regular identifiers, and are bound by a special with construct whose scope is dynamic, ..."
Abstract
-
Cited by 70 (3 self)
- Add to MetaCart
This paper introduces a language feature, called implicit parameters, that provides dynamically scoped variables within a statically-typed Hindley-Milner framework. Implicit parameters are lexically distinct from regular identifiers, and are bound by a special with construct whose scope is dynamic, rather than static as with let. Implicit parameters are treated by the type system as parameters that are not explicitly declared, but are inferred from their use. We present implicit parameters within a small call-by-name X-calculus. We give a type system, a type inference algorithm, and several semantics. We also explore implicit parameters in the wider settings of call-by-need languages with overloading, and call-by-value languages with effects. As a witness to the former, we have implemented implicit parameters as an extension of Haskell within the Hugs interpreter, which we use to present several motivating examples. 1 A Scenario: Pretty Printing You have just finished writing the perfect pretty printer. It takes as input a document to be laid out, and produces a string. pretty:: Dot-> String You have done the hard part-your code is lovely, concise and modular, and your pretty printer produces output that is somehow even prettier than anything you would bother to do by hand. You’re thinking: JFP: Functional Pearl. But, there are just a few fussy details left. For example, you were not focusing on the unimportant details, so you hard-coded the width of the display to be 78 characters. The annoying thing is that the check to see if YOU have exceeded the display width is buried deep within the code.... if i> = 78 then.. permission to make digital or hard copies of all or part ofthis work for PersOXll Or &SSrOOnl USC is granted witllout fee provided that copies are not nn & or distributed for prolit or commercial advantage a$ld that copies bar this notice and the full citation on the first page. ~l‘o cC,py
Dynamic Rebinding for Marshalling and Update, with Destruct-Time λ
- IN PROC. ICFP
, 2003
"... Most programming languages adopt static binding, but for distributed programming an exclusive reliance on static binding is too restrictive: dynamic binding is required in various guises, for example when a marshalled value is received from the network, containing identifiers that must be rebound to ..."
Abstract
-
Cited by 32 (14 self)
- Add to MetaCart
Most programming languages adopt static binding, but for distributed programming an exclusive reliance on static binding is too restrictive: dynamic binding is required in various guises, for example when a marshalled value is received from the network, containing identifiers that must be rebound to local resources. Typically it is provided only by ad-hoc mechanisms that lack clean semantics. In this
Amalgams: Names and Name Capture in a Declarative Framework
, 1998
"... this paper, we address the problem of names and name capture on its own by designing, through the use of three operators, a complete and consistent mechanism of name capture for a declarative framework. We perceive expressions with free names as incomplete expressions which will be dynamically compl ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
this paper, we address the problem of names and name capture on its own by designing, through the use of three operators, a complete and consistent mechanism of name capture for a declarative framework. We perceive expressions with free names as incomplete expressions which will be dynamically completed by a name capture mechanism. The formalism allows the denition of rst-class environments (which can be the result of a computation). We apply this mechanism to model distributed incremental program construction and to dene an object oriented programming style in a declarative language
Dynamic rebinding for marshalling and update, via redex-time and destruct-time reduction
, 2008
"... ..."
Dynamic Rebinding for Distributed Programming
, 2002
"... Most programming languages adopt static binding, but for distributed programming an exclusive reliance on static binding is too restrictive: dynamic binding is required in various guises. Typically it is provided only by ad-hoc mechanisms that lack clean semantics. ..."
Abstract
- Add to MetaCart
Most programming languages adopt static binding, but for distributed programming an exclusive reliance on static binding is too restrictive: dynamic binding is required in various guises. Typically it is provided only by ad-hoc mechanisms that lack clean semantics.

