Skip to Content
Emerging Programming Languages
book

Emerging Programming Languages

by O'Reilly Editorial Team
June 2019
Intermediate to advanced
35 pages
42m
English
O'Reilly Media, Inc.
Content preview from Emerging Programming Languages

Chapter 4. Language Summaries

The rest of this report examines the purpose of each language and how some of its features reflect that purpose.

Crystal

Although the proponents of many languages claim good performance, developers who make speed of execution a high priority still fall back on C or one of its derivatives. Crystal is the latest attempt to achieve both performance and the highly structured, compact code permitted by Ruby. Thus, Crystal is procedural and object oriented. It allows for both explicit typing and type inference, like many scripting languages, offering the fool-proof typing of traditional compiled languages and the simplicity of classic scripting languages.

The resemblance to Ruby can be seen in such syntax features as the do loops in the following calls to a database. The activities in this snippet will be familiar to anyone who has accessed a database from a programming language using something like the Open Database Connectivity standard:

DB.open "sqlite3://./data.db" do |db|                 1
  db.exec "CREATE TABLE contacts (name VARCHAR(30), age INT)"
  db.exec "INSERT INTO contacts VALUES (?, ?)", "Frank", 30
  db.exec "INSERT INTO contacts VALUES (?, ?)", "Alexa", 33

  db.query "SELECT name, age FROM contacts" do |rows| 2 rows.each do name, age = rows.read(String, Int32) person ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Haskell Quick Syntax Reference: A Pocket Guide to the Language, APIs, and Library

Haskell Quick Syntax Reference: A Pocket Guide to the Language, APIs, and Library

Stefania Loredana Nita, Marius Mihailescu
Programming Crystal

Programming Crystal

Ivo Balbaert, Simon St. Laurent

Publisher Resources

ISBN: 9781492082590