惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
J
Java Code Geeks
I
InfoQ
V
Visual Studio Blog
M
MIT News - Artificial intelligence
H
Help Net Security
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
G
Google Developers Blog
A
About on SuperTechFans
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
S
SegmentFault 最新的问题
WordPress大学
WordPress大学

博客园 - 坚强2002

[Erlang 0129] Erlang 杂记 VI Graphviz绘制百家争鸣图 [Erlang 0128] Term sharing in Erlang/OTP 下篇 [Erlang 0127] Term sharing in Erlang/OTP 上篇 Elixir 1.0 Release [Erlang 0126] 我们读过的Erlang论文 读几首诗 [Erlang 0125] Know a little Erlang opcode "Becoming Functional" 阅读笔记+思维导图 [Erlang 0124] Erlang Unicode 两三事 - 补遗 [Erlang 0123] Erlang EPMD [Erlang 0122] Erlang Resources 2014年1月~6月资讯合集 [Erlang 0120] Know a little Core Erlang [Erlang 0119] Erlang OTP 源码阅读指引 [Erlang 0118] Erlang 杂记 V [Erlang 0117] 当我们谈论Erlang Maps时,我们谈论什么 Part 2 [Erlang 0116] 当我们谈论Erlang Maps时,我们谈论什么 Part 1 致鸡鸣狗盗 一个技术人的知识管理方法论
[Erlang 0121] 当我们谈论Erlang Maps时,我们谈论什么 Part 3
坚强2002 · 2014-04-10 · via 博客园 - 坚强2002

Erlang/OTP 17.0 has been released 

  Erlang/OTP 17.0发布了,不过Maps相关的设计还没有尘埃落定,目前:


     

       With Maps you may for instance:

              -- M0 = #{ a => 1, b => 2}, % create associations

              -- M1 = M0#{ a := 10 }, % update values

              -- M2 = M1#{ "hi" => "hello"}, % add new associations

              -- #{ "hi" := V1, a := V2, b := V3} = M2. % match keys with
              values

              For information on how to use Maps please see the Reference
              Manual.

              The current implementation is without the following features:

              -- No variable keys

              -- No single value access

              -- No map comprehensions

              Note that Maps is experimental during OTP 17.0.

另外有一个不兼容的情况: OTP-11782  == erts ==

 The external format for Maps has changed in a way that is not  compatible with the format used in OTP 17.0-rc1 and OTP  17.0-rc2.

在这里查看详情:

Change the subtag used for maps from 0xB to 0xF

Maps 模块对应的文档位置

http://erlang.org/doc/man/maps.html

占坑,后续变动将在此更新.

Learn You Some Erlang 对Maps内容的增补章节 

 顺便补几张图:

上面的图看不懂?可以参考下面这篇论文,其中简要介绍了Erlang的Tag-Scheme,或者可以去看下本文的第一篇 http://www.cnblogs.com/me-sa/p/when_we_talk_about_erlang_maps_1.html

On Preserving Term Sharing in the Erlang Virtual Machine

摘要:In this paper we describe our experiences and argue through examples why flattening terms during copying is not a good idea for

a language like Erlang. More importantly, we propose a sharing preserving copying mechanism for Erlang/OTP and describe a pub-
licly available complete implementation of this mechanism.