[erlang-questions] leading underscores on variables versus _
Dominic Williams
xpdoka@REDACTED
Sat Feb 3 18:37:52 CET 2007
Hi Matthias,
Matthias Lang wrote:
> Only if you define "easy" as somehow keeping track which
> source files use the old rules and which use the new
> conventions,
Well, this one /is/ easy, as each module coded with the old
rule can be given a
-compile(bind_leading_underscore).
... attribute.
> and never forget which is which when switching...
Yes, this is a matter of discipline, or process. My personal
approach when adopting a new feature, convention or
guideline is to leave old modules alone until I happen to be
doing some other change in one - at which point I change the
whole module over to using the new system (which usually
takes about 2 minutes).
I do think it's a small, worthwhile price to pay to keep
improving the language.
Regards,
Dominic Williams
http://www.dominicwilliams.net
----
More information about the erlang-questions
mailing list