Skip to main navigation Skip to search Skip to main content

Coupling catch clauses with local declarations

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

We propose an alternative to the usual try-catch construct, where catch clauses are coupled with the declaration of a local variable, rather than with an arbitrary expression. That is, in case initialization of the local variable fails, they provide an alternative computation which does not depend on such variable. This alternative mechanism subsumes the standard one and allows a more natural and functional programming style. We illustrate such advantages by some paradigmatic examples. The proposal is formalized as an extension of Featherweight Java (FJ) with a type system which can be proved to be sound.

Original languageEnglish
Title of host publicationProceedings of the 18th Workshop on Formal Techniques for Java-Like Programs, FTfJP 2016 - Co-located with ECOOP 2016
PublisherAssociation for Computing Machinery, Inc
ISBN (Electronic)9781450344395
DOIs
Publication statusPublished - 17 Jul 2016
Event18th Workshop on Formal Techniques for Java-Like Programs, FTfJP 2016 - Rome, Italy
Duration: 19 Jul 2016 → …

Publication series

NameProceedings of the 18th Workshop on Formal Techniques for Java-Like Programs, FTfJP 2016 - Co-located with ECOOP 2016

Conference

Conference18th Workshop on Formal Techniques for Java-Like Programs, FTfJP 2016
Country/TerritoryItaly
CityRome
Period19/07/16 → …

Keywords

  • Exceptions
  • Featherweight Java
  • Language design
  • Typed calculus

Fingerprint

Dive into the research topics of 'Coupling catch clauses with local declarations'. Together they form a unique fingerprint.

Cite this