Skip to main content Accessibility help
×
Hostname: page-component-76dd75c94c-vpfzz Total loading time: 0 Render date: 2024-04-30T09:43:26.643Z Has data issue: false hasContentIssue false

6 - The Rationale for CML

Published online by Cambridge University Press:  07 October 2009

John H. Reppy
Affiliation:
University of Chicago
Get access

Summary

The design of CML has been driven by practical experience. In particular, the mechanism of first-class synchronous operations is motivated by the fundamental conflict between selective communication and abstraction. This chapter explains the rationale for the design of CML, and especially for first-class synchronous operations. It is aimed at people interested in language design, and is not required to understand the remainder of the book. In this chapter, we focus on coreCML — synchronous message passing plus the event combinators — the other synchronization mechanisms found in CML, such as mailboxes, I-variables, and M-variables, can be viewed as derived forms. Some of the discussion here repeats earlier arguments, but is included for coherence.

Basic design choices

As surveyed in Chapter 2, there are many possible choices for the design of a concurrent language. CML chooses message passing over shared memory, synchronous communication over asynchronous, and simple rendezvous over extended rendezvous. This section argues in favor of these choices.

While SML is an imperative language, its design greatly encourages a mostly functional style of programming. Mutable values must be declared explicitly as such, and there is syntactic overhead on their use. For these reasons, extending SML with sharedmemory concurrency primitives is not true to the “spirit” of the language. Message passing, on the other hand, encourages a mostly functional programming style that fits well with ML. As we have seen, much of the state in typical CML programs is represented as immutable arguments to the tail-recursive functions that implement threads.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 1999

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • The Rationale for CML
  • John H. Reppy, University of Chicago
  • Book: Concurrent Programming in ML
  • Online publication: 07 October 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574962.008
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • The Rationale for CML
  • John H. Reppy, University of Chicago
  • Book: Concurrent Programming in ML
  • Online publication: 07 October 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574962.008
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • The Rationale for CML
  • John H. Reppy, University of Chicago
  • Book: Concurrent Programming in ML
  • Online publication: 07 October 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574962.008
Available formats
×