Why dependent types matter

被引:9
|
作者
McKinna, J [1 ]
机构
[1] Univ St Andrews, St Andrews KY16 9AJ, Fife, Scotland
关键词
algorithms; design; languages; theory; verification;
D O I
10.1145/1111320.1111038
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Language designers have in recent years proposed a wealth of richer type systems for programming which seek to extend the range of statically enforced guarantees on data and code. Most such proposals have been evolutionary extensions of ML or Haskell, offering programmers a balanced compromise between expressive strength and existing well-understood technology. Typically they revolve around type- or kind-indexed types such as GADTs, supported by limited equality reasoning at the type-checking level, thus separating the dynamic behaviour of programs from the (simpler) static behaviour of indexing information occurring in their types. I want to argue in this talk for a more radical departure from such practice by examining full spectrum type dependency, lifting such restrictions on the data upon which types may depend. Conor McBride and I designed the language EPIGRAM for experiments in programming with inductive families of data (of which GADTs are a special case). Using it for illustration, I will explore some of the possibilities and challenges afforded by full spectrum type dependency at the static and dynamic level: types directly support modelling complex invariants in terms of other data (rather than their types), with a Curry-Howard flavour of data-as-evidence; such complexity is on a 'pay-as-you-go' basis, while keeping type annotations and other syntactic overheads to a minimum; data decomposition steps, e.g. case analysis, furnish more informative interactions between types and values during typechecking; such steps may moreover be abstractly specified by their types, and thus user definable; this supports a style of programming embracing "learning by testing', views, and Burstall's 'hand simulation plus a little induction'; the absence of a rigid phase distinction need not lead to type-passing or excessive run-time overhead; effectful computation, in particular partiality, can be incorporated via variations on existing ideas such as monads. This talk is based on joint work with Conor McBride, Edwin Brady and Thorsten Altenkirch.
引用
收藏
页码:1 / 1
页数:1
相关论文
共 50 条
  • [1] Why Dependent Types Matter
    Altenkirch, Thorsten
    12TH SYMPOSIUM ON PROGRAMMING LANGUAGES AND SOFTWARE TOOLS, SPLST' 11, 2011, : 7 - 7
  • [2] Quantum state smoothing: why the types of observed and unobserved measurements matter
    Chantasri, Areeya
    Guevara, Ivonne
    Wiseman, Howard M.
    NEW JOURNAL OF PHYSICS, 2019, 21 (08):
  • [3] Not all Costs Are Created Equal: What Are the Types of Costs and Why Do They Matter?
    Magruder, Matthew L.
    Mansour, Elie J.
    Scuderi, Giles R.
    Delanois, Ronald E.
    Mont, Michael A.
    JOURNAL OF ARTHROPLASTY, 2025, 40 (02): : 272 - 275
  • [4] Why matter effects matter for JUNO
    Khan, Amir N.
    Nunokawa, Hiroshi
    Parke, Stephen J.
    PHYSICS LETTERS B, 2020, 803
  • [5] WHY BION? WHY JUNG? FOR THAT MATTER, WHY FREUD?
    Rosegrant, John
    JOURNAL OF THE AMERICAN PSYCHOANALYTIC ASSOCIATION, 2012, 60 (04) : 721 - 745
  • [6] Why Meetings Matter
    West, Lauren
    PS-POLITICAL SCIENCE & POLITICS, 2011, 44 (03) : 1 - 1
  • [7] Why standards matter
    Mallett, RL
    ISSUES IN SCIENCE AND TECHNOLOGY, 1999, 15 (02) : 63 - 66
  • [8] Why Registries Matter
    Gottfredson, Denise C.
    CRIMINOLOGY & PUBLIC POLICY, 2016, 15 (03) : 651 - 659
  • [9] Why Sharks Matter
    Hauser-Davis, Rachel Ann
    BIOLOGICAL CONSERVATION, 2022, 272
  • [10] Why bilingualism matter
    Myers-Scotton, C
    AMERICAN SPEECH, 2000, 75 (03) : 290 - 292