Have I got a deal for you!
-
for theoreticians:
Call-by-Need Is Clairvoyant Call-by-Value (2019 ) -
for implementors:
On Inter-deriving Small-step and Big-step Semantics: A Case Study for Storeless Call-by-need Evaluation (2012).
(Alas, the acronym “STM” has already been taken…)
Of course, the '98 paper is concerned with side-effects in SML, which warrants a more first class integration of commands.
Not necessarily - read section 5.1 (First-order versus higher-order, page 29 of 33) in How to Declare an Imperative (1997). But failing that, there’s the evidence-passing style as used by Linear Haskell:
As it happens, we were just discussing today [again! ] how to equip STG with an “ABI” that allows us to have first class call-by-value functions:
That’s odd: from Making a Fast Curry (2004), I thought the STG language was already strict.
Edit: from that paper, I presumed an implementation of the STG language in another strict language would be a simple matter of replacing the local bindings v = e
in each Let
-expressions with calls to e.g. v = halloc(e);
with the result of the Let
-expression immediately following:
Let b1 = e1; ... bN = eN; in result
therefore being expanded to:
b1 = halloc(e1); ⋮ bN = halloc(eN); {- code for result -};
So in that very specific sense, there’s already a strict variant of the STG language lurking in the original one - it just needs to be “exposed”.
Perhaps the “strict Core” variant devised in Types are Calling Conventions (2009) could be of some use, despite it being (apparently) superseded…
Both of these references are very interesting, thank you! […]
…getting back on-topic: were Standard ML’s int
values also similarly limited in size back then (1990-1997)? If so, the appropriate standard reference for that language ought to have the answer to the original question.