Re: Why, for example, maps but array?

"Lloyd R. Prentice" <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <[email protected]>
Hi Michael,

I just used sets today to write a search tag generator. Works. But it surprises me that obvious functions like file:move/2 and the a write companion to file:consult/1 are not in the library. No doubt someone has an explanation.

Today I wanted to pull a list of search words out of a file and turn the list into a function. I’m sure it’s simple but beyond my pay grade.  Somewhat confused that some file functions require filenames and others IoDevice.

Re if constructions, I turn first to pattern matching, next to case statements. But I suspect there’s a cogent discussion buried in the Erlang archives. 

I’m a dilettante, but hack on with purpose.

Best,

LRP

Sent from my iPad

> On Aug 14, 2021, at 6:27 PM, Michael P. <[email protected]> wrote:
> 
> When writing Erlang, my brain always produces:
> array, filename, list, map, ..., but not:
> lists, maps, proplists, sets, ....
> 
> I cannot imagine that anyone applies the
> general concept of 'module deals with lists'
> to writing a concrete line of source code.
> 
> To me `+` is 'addition', not 'additions'.
> 
> There is even orddict but ordsets ...
> 
> ... that corresponds to dict but sets.
> 
> The decision seems to depend on author
> and some tossing of coins.
> 
> Can there be learned anything from that?
> 
> 
> ~Michael
> 
> --
> 
> The story of the Ministry of funny Operators:
> 
> :=    new walrus
> ;=    winking walrus
> ?:=   confused walrus
> :,=   weeping walrus
> X=    extinct walrus
> 
> 
> 
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.