skip to main content
article

Use (and Abuse) of Ada 2022 Features in Designing a JSON-Like Data Structure

Published:19 December 2022Publication History
Skip Abstract Section

Abstract

Ada 2022 introduces new features that enable more natural-looking initializations. On the one hand, it is now possible to use universal numbers and strings to initialize any private type; on the other hand, containers can be initialized directly without the explicit use of converting functions. Both features are enabled through new aspects that associate user-defined subprograms with the necessary initialization calls.

In this work, the possibility of using these new features is explored to define a container type that allows initializations using heterogeneous types, as is usual in textual formats for structured data such as JSON, TOML and YAML, and still without the need to resort to explicit conversion calls or "crutch" functions like the often-seen trick of overloading the "+" operator. Although this has proven ultimately avoidable, there is still the need to use qualifications in certain circumstances.

References

  1. "User-defined literals." http://www.ada-auth.org/ standards/2xrm/html/RM-4--2--1.html. Ada Reference Manual (Ada 202x Draft 32).Google ScholarGoogle Scholar
  2. "Container aggregates." http://www.ada-auth.org/ standards/2xrm/html/RM-4--3--5.html. Ada Reference Manual (Ada 202x Draft 32).Google ScholarGoogle Scholar
  3. L. Bassett, Introduction to JavaScript object notation: a to-thepoint guide to JSON. " O'Reilly Media, Inc.", 2015.Google ScholarGoogle Scholar
  4. A. R. Mosteo, "YEISON repository." https://github.com/ mosteo/yeison, May 2022.Google ScholarGoogle Scholar
  5. A. R. Mosteo, "Use (and abuse?) of Ada 2022 features in designing a JSON-like data structure." https://fosdem.org/ 2022/schedule/event/ada_2022_json_like/, 2022. FOSDEM.Google ScholarGoogle Scholar

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGAda Ada Letters
    ACM SIGAda Ada Letters  Volume 42, Issue 1
    June 2022
    67 pages
    ISSN:1094-3641
    DOI:10.1145/3577949
    Issue’s Table of Contents

    Copyright © 2022 Copyright is held by the owner/author(s)

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 19 December 2022

    Check for updates

    Qualifiers

    • article
  • Article Metrics

    • Downloads (Last 12 months)6
    • Downloads (Last 6 weeks)0

    Other Metrics

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader
About Cookies On This Site

We use cookies to ensure that we give you the best experience on our website.

Learn more

Got it!