[erlang-questions] Time to update programming rules?

Benjamin Tolputt btolputt@REDACTED
Mon Sep 8 05:16:10 CEST 2008


Richard A. O'Keefe wrote:
> That's pretty much of a straw man position.
> It's not a question of a mere *possibility* of errors,
> but of a "feature" that makes errors *especially* likely,
> and which offers no compensating advantages.

Without trying to be a pain, I'll separate the fact (use of the feature
increases the possibility of errors) from the opinion (no compensating
advantages).

I agree that using the feature will increase the likelihood of a
particular type of bug creeping into the code. In fact, this likelihood
is currently enough to keep me from using the feature. On the other hand
stating that there is "no" compensating advantages is simply your
opinion (well respected as it is).

> The developers of Erlang have so far refrained from announcing
> dotted module names as a permanent feature of the language.

True, and neither of us can state categorically what their plans are on
the feature until they make an official comment on it.

> There was a lot of discussion back in 2003 and it does not appear
> that the dotted names "feature" has been significantly revised since
> to address any of the issues that were seen five years ago.

It is still a feature of Erlang five years from then. My interpretation
is that this implies the feature is likely to stay. Your opinion
differs, but neither of us can make statements of *fact* on it until the
Erlang developers pipe up with something official.

> Actually, no.  There never ever was anything whatsoever in Erlang
> to stop you writing module names like 'a.b.c' and thereby having
> the beam file placed as 'a.b.c.beam', which quite naturally never
> did conflict with an 'e.f.c.beam' file or 'e.f.c' module.
>
> Allowing you to write dotted names without quotation marks is no
> big deal either: we ALWAYS had the ability to write module names
> with @ signs in them.

The readability alone of "x@REDACTED@z" compared to "x.y.z" should make junk of
that argument. Using quotes for atoms appears (from all Erlang text &
code I have been able to get a hold off) to be for "special cases only".
A "compound name system" for modules is not something I would like to
think of as special case.

> You should not need a Gargantuan cycle-hogging "IDE" to paper over
> mistakes in a design.  Have you studied Meyer's LACE at all?

*laugh* And what language does not have design flaws?

Seriously though, not all IDE's are cycle-hogging beasts to the level
that they impede development. Unless you are "developing" code on an
embedded device or a machine approaching it's 12th birthday, I'm sure an
Erlang IDE based on Eclipse or similar would operate just fine without
killing the OS you'd be developing on..


In summary, though - I'd be just as happy (if not happier) if the
package system created "a.b.c.beam" files for the "a.b.c" module, so
long as it provided a similar
syntax. Quoting all my module names (or worse, using the '@' character
for compound names) seems counter to all the other code I have seen
written for Erlang. Admittedly, there doesn't seem to be any using the
packages functionality either, but I find it alot more readable than
(for example) "inet@REDACTED@reponse:some_func(...)"


--Ben

P.S. Honestly find it difficult to argue this case as my respect for you
in regards to Erlang development. Your name in the sender line is
generally enough for me to read a subject I might otherwise skip on this
list. Please do not take this thread to be my overall assessment of your
skills & experience; just a difference of opinion.



More information about the erlang-questions mailing list