CommunityNews

CommunityNews

Programming with union, intersection, and negation types

Programming with union, intersection, and negation types.
In this essay, I present the advantages and, I dare say, the beauty of
programming in a language with set-theoretic types, that is, types that include
union, intersection, and negation type connectives. I show by several examples
how set-theoretic types are necessary to type some common programming patterns,
but also how they play a key role in typing several language constructs-from
branching and pattern matching to function overloading and type-cases-very
precisely. I start by presenting the theory of types known as semantic
subtyping and extend it to include polymorphic types. Next, I discuss the
design of languages that use these types. I start by defining a theoretical
framework that covers all the examples given in the first part of the
presentation. Since the system of the framework cannot be effectively
implemented, I then describe three effective restrictions of this system: (i) a
polymorphic language with explicitly-typed functions, (ii) an implicitly-typed
polymorphic language à la Hindley-Milner, and (iii) a monomorphic language
that, by implementing classic union-elimination, precisely reconstructs
intersection types for functions and implements a very general form of
occurrence typing. I conclude the presentation with a short overview of other
aspects of these languages, such as pattern matching, gradual typing, and
denotational semantics.

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Where Next?

Popular General Dev topics Top

First poster: HenryCost
I wired my tree with 500 LED lights and calculated their 3D coordinates… If you support me on Patreon at any point in December 2020 I wi...
New
Exadra37
As part of our continued goal of helping developers provide safer products for businesses and consumers, we here at McAfee Advanced Threa...
New
First poster: andrea
What’s the real cost of interruptions? I illustrate all the context developers keep in their head and how it starts to decay immediately ...
New
First poster: AstonJ
We engineered a wearable microphone jammer that is capable of disabling microphones in its user’s surroundings, including hidden micropho...
New
First poster: bot
It has some interesting features: It’s entirely wireless (the left half speaks Bluetooth to the right half, and the right half speaks B...
New
First poster: Maartz
Apple’s taken the joy out of its Books app with iOS 16. The lovely page flip is gone.
New
First poster: gulshan212
Why Python keeps growing, explained | The GitHub Blog. A deep dive into why more people are using Python than ever, its key use cases, a...
New
First poster: joeb
GitHub - crablang/crab: A community fork of a language named after a plant fungus. All of the memory-safe features you love, now with 100...
New
First poster: KnowledgeIsPower
Building a Slack/Discord alternative with Tauri/Rust linen <span class="hashtag-icon-placeholder"></span>blog. Introduction My name is K...
New
CommunityNews
Christian Mills - Testing Intel’s Arc A770 GPU for Deep Learning Pt. 2. This post covers my experience training image classification mod...
New

Other popular topics Top

Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1139 25503 755
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New