News for hackers. Stuff that matters.
Re:Erlang inventor: Why do we need modules and files? by pwpwp on Tuesday May 24, 2011 @02:40PM (#2581012)
Is misc.foo better than misc_foo?

My point being - a point also raised by Joe - is that just "adding dots" doesn't solve anything.

Re:Erlang inventor: Why do we need modules and files? by falcolas on Tuesday May 24, 2011 @02:59PM (#2581091)
I would rather have misc.foo (or in python terms, from misc import foo), than this_is_a_unique_function_name_that_does_foo, or '0000100302foo' with a ton of metadata to explain what it does and why it's better than every other similar function.

I'm trying to imagine visually parsing a program where the function names are merely unique identifiers that don't necessarily relate to their function, and it's not going well.

Re:Erlang inventor: Why do we need modules and files? by d0m on Tuesday May 24, 2011 @03:25PM (#2581207)
From what I understand, it'd be more:

from global_database import foo291 as foo

and you'd have lots of meta information associated to foo291 so you could easily find it by doing:

db-search blah

Re:Erlang inventor: Why do we need modules and files? by bartonfink on Tuesday May 24, 2011 @05:20PM (#2581707)
<quote> I'm trying to imagine visually parsing a program where the function names are merely unique identifiers that don't necessarily relate to their function... </quote>

Just to be pedantic: you're doing this already.

int add(int a, int b){ return a - b; }

Re:Erlang inventor: Why do we need modules and files? by seiji on Tuesday May 24, 2011 @03:25PM (#2581206)
The function names would still be user readable. The compiler and/or runtime would translate what you say to what you mean (think c++ mangling).
Re:Erlang inventor: Why do we need modules and files? by haberman on Tuesday May 24, 2011 @05:26PM (#2581732)
> My point being - a point also raised by Joe - is that just "adding dots" doesn't solve anything.

It's visually much easier to parse foo.bar_baz.quux than foo_bar_baz_quux.

Also, It lets symbols inside the module call their friends by quux instead of foo_bar_baz_quux.

Re:Erlang inventor: Why do we need modules and files? by lelele on Tuesday May 24, 2011 @07:37PM (#2582165)
> Also, It lets symbols inside the module call their friends by quux instead of foo_bar_baz_quux.

This is the main point in support of modules: they make you use names just like you are used to in real life. In a given context, shorter names suffice. When more contexts are involved, then you need qualifiers.