[erlang-questions] Newbie questions about file module

Bjorn Gustavsson bgustavsson@REDACTED
Sat Mar 14 10:14:07 CET 2009


On Sat, Mar 14, 2009 at 4:51 AM, Scott Lystig Fritchie
<fritchie@REDACTED> wrote:
> Bjorn Gustavsson <bgustavsson@REDACTED> wrote:
>
>>> How frequent is it to use a deep I/O list as a file name?  [...]
>
> bg> Unfortunately, for historical reasons, filenames are allowed to
> bg> contain atoms and atoms are not allowed in I/O lists. At one time in
> bg> OTP's history, we wanted to disallowed atoms in filenames, but it
> bg> turned out that many applications used atoms in filenames.
>
> Sorry for picking up a thread that's a month old but ... {trying to
> understand what you're implying} ... those legacy/whatever apps are
> using filenames with deep lists *and* one or more list members may be
> atoms?  Oi!
>
> Looking at one of Ville's followup messages ... 27% of his runtime spent
> sanity checking for that kind of rare oddity is ... enough to ... use a
> lot of ellipses.  ...      ...
>

It was a long time ago (more than 10 years ago) that we gave up on getting
rid in atoms in filenames. I am not sure whether the applications actually put
atoms in deep lists or only used one atom as a filename. I also don't know how
much of that old code is still used today.

One way to get rid of atoms in filenames (if everyone agrees that is a
good idea),
would be have Dialyzer start warning for them, and then we could make the change
in a future release.

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list