Show HN: ES6_maps, new Elixir syntax feature via runtime compiler hacking

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • es6_maps

    ES6-like shorthand syntax for Elixir maps: `%{foo, bar} = map; IO.puts(foo)`

  • short_maps

    Discontinued ⚠️Retired⚠️ library that provided a ~m sigil for ES6-like map destructuring in Elixir.

  • This was done previously with the `short_maps` library, which the author—a member of the Elixir core team—eventually retired and archived due to regrets from the undesirable impacts on clarity.

    https://github.com/whatyouhide/short_maps

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • 2. at the same time, being a language feature it should be simple - es6_maps works only with atom keys and has no extra features over the key expansion.

    Point 1 is additionally reinforced by how easy it was to introduce to the compiler - I’m injecting just 9 lines of simple code, while parser and lexer already accept short-form maps without modifications.

    [0] https://github.com/meyercm/shorter_map

  • destructure

    Javascript-style destructuring for Elixir

  • I've been using Destucture [1] for a few years. It's an interesting compromise that works for atom and string keys because it's explicit, kind of like the sigil approach. Though this seems way more streamlined, especially as someone who uses JS for front-end apps.

    [1]https://github.com/danielberkompas/destructure/

  • shorter_maps

    Elixir ~M sigil for map shorthand. `~M{id, name} ~> %{id: id, name: name}`

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ask HN: Why isn't Phoenix/Elixir more mainstream?

    4 projects | news.ycombinator.com | 29 Sep 2023
  • Working with JSON files

    2 projects | /r/elixir | 20 Sep 2022
  • How do you deal with manipulating deep / complex data structures in Elixir?

    2 projects | /r/elixir | 13 Sep 2022
  • A library for performing fast actions with nested data structures in Elixir

    2 projects | /r/elixir | 26 May 2022
  • Are there any open source Elixir projects that I could help with as a beginner?

    5 projects | /r/elixir | 18 May 2022