Too busy coughing (thanks, COVID) to hold my breath either.
However, the Frames proposal went apparently unnoticed for a long time before the OTP team decided to do something almost but not completely different.
(There are things that maps can do easily that frames were deliberately designed NOT to do, on the other hand frames would have been more efficient for what they were designed to be.)
What matters is that
- there is a problem
- there is KNOWN to be a possible solution
- someone may be sufficiently provoked by the existing proposal to do something
- even if it IS something else, as long as the Erlang community benefit.
As for converting âstringsâ (however defined) to atoms (or not) in the context
of JSON, Iâm slowly putting together a new EEP, containing this example. (With a
debt of gratitude to Malcolm Bradbury. Coming as it does from a book called
âRates of Exchangeâ, the vloska is the perfect fictional currency.)
The following is adapted from data I got via a free (limited-use)
API key from OpenExchange (openexchangerates.org).
{
"disclaimer": "Fictitious data",
"date-and-time": "2023-02-29T12:00:00.00Z",
"currencies": {
"SAD" : "South Atlantean Drachma",
"VLO" : "Slakana Vloska",
"ZLT" : "Erewhonian Zlotnick"
},
"conversion": {
"base" : "SAD",
"rates" : {
"SAD" : 1.00,
"VLO" : 488.01,
"ZLT" : 7.78
}
}
}
Some of the object keys here are part of the PROTOCOL, and you want those ones converted to atoms. base, conversion, Currencies, date-and-time, disclaimer, rates
Other of the object keys are part of the PAYLOAD, they have to be converted the same way in both subobjects, but there is no gain from converting them to atoms. SAD, VLO, ZLT The code processing these keys probably isnât going to be matching them against known atoms (I mean, who knew that South Atlantis was going to break away from Atlantis, or that theyâd switch from the Dirham to the Drachma?)