[erlang-questions] eep-0012 (Extensions to comprehensions)

Darren New <>
Fri Aug 8 04:08:17 CEST 2008


Richard A. O'Keefe wrote:
> It's exactly the same "problem", but do I hear lots of
> complaints about C because of it?

I gripe about it every time I get it wrong in SQL. My chances of 
changing C or SQL syntax are low. Perhaps the people who complain are 
those hoping one could actually *improve* it in more modern languages.

> I don't hear lots of people complaining about the fact
> that turning
> 	String x,
> 	       y;
> into	String x,
> 	       y,
> 	       z;
> results in a 1-change 2-line diff instead of a
> 1-change 1-line diff using Java. 

Perhaps because people write
   String x;
   String y;
   String z;
instead. Or perhaps because a change of this type is always accompanied 
by usually-numerous related changes elsewhere, while a change in a 
declaration is often close to stand-alone.

> Why will "many" people be bothered about this in Erlang,
> when they apparently aren't bothered by it in C or Java
> or Javascript?

What makes you think they're not?  That they're not posting their 
complaints about Java on an Erlang mailing list?

> Why is the "add one thing -> diff should be one line"
> idea so important for changes to data constructors but
> ONLY data constructors?

Because data constructors often stand alone with no further change 
needed (if you're doing data-driven programming), while changes to 
method declarations require changes to all the callers as well?

If I have a "list of files which should exist before I run this 
function", I can add files to it without changing the code that runs 
through the list. If I add "and here's the permissions the files should 
have", I need to change several places in the code.

-- 
Darren New / San Diego, CA, USA (PST)
  Ever notice how people in a zombie movie never already know how to
  kill zombies? Ask 100 random people in America how to kill someone
  who has reanimated from the dead in a secret viral weapons lab,
  and how many do you think already know you need a head-shot?



More information about the erlang-questions mailing list