[erlang-questions] Best choice for complex data structure

Donald Steven t6sn7gt@REDACTED
Thu Jan 24 12:37:03 CET 2019


I'm trying to figure out how to shape the (musical) data.  In everyday 
language, a musical idea has an architecture of formal nested units and 
gestures made up of one or more events which have sounds and silences.  
In Rust, the latter part of the above would yield a statement like:

scoreIdea.gesture[iGesture-1].event[iEvent-1].sounds +=1

which is manageable.  But when I think about accessing data nested many 
levels deep in Erlang, I'm kinda flummoxed. Instinctively, I don't think 
transliterating something like this to records (or even maps?) is the 
way to go?

All suggestions greatly appreciated.

On 1/24/2019 6:11 AM, zxq9@REDACTED wrote:
> On 2019年1月24日木曜日 12時43分52秒 JST you wrote:
>> I found that lenses gives reasonable good abstraction to deal with deeply nested structures.
> That said, I find that very often things like lenses are "chindougu": Unuseless inventions.
> They solve problems that would never have existed had more thought been given to the actual shape of data within the program in question.
>
> That's not always true, but quite often it is.
>
> Come to think of it, much of the most heavily hyped efforts in software are chindougu.
>
> -Craig
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190124/026e3180/attachment.htm>


More information about the erlang-questions mailing list