| Author |
Message |
< Erlang questions mailing list ~ Fun with Erlang (was Stand Alone Erlang for Windows. yet ag |
| thantos at telocity.com |
Posted: Wed Mar 21, 2001 11:18 pm |
|
|
|
Guest
|
On Wed, Mar 21, 2001 at 11:56:56AM -0600, Chris Pressey wrote:
> "If, for example, an ISDN handler is implemented using five different
> and related modules. These module should be given names such as:
> isdn_init, isdn_partb, isdn_..."
>
> -- http://www.erlang.se/doc/programming_rules.shtml
I'm well aware of this. My problem is it rather, well, "sucks."
"Sucks" isn't too strong for this particular bit, I don't think.
Maybe I'm a living oddity, but I like tucking files into nice, neat
little directory-structures that mimic inheritance and such, so that I
know exactly what I'm looking at within any given point. Such
hierarchies let multiple people be responsible for different bits,
even down to directory permissions (and, in this case, that's a
biggie). They are, all in all, just really darn handy.
Python does the "right thing" here, I think. You can import a
directory containing the proper initialization module filename and it
implies the whole structure on down as sub-modules. Accessing deep
structures becomes easy. Erlang's module system, especially given the
gen_* servers, doesn't have that same kind of innate simplicity. That
makes it difficult to pursue things like the MU* project with certain
designs that, nevertheless, seem perfect for it.
--
Alexander Williams (thantos_at_telocity.com) | In the End,
"Blue Jester needs food." | Oblivion
"Blue Jester needs fuku-wearing cuties." | Always
http://www.chancel.org | Wins
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
| cpressey at catseye.mb.ca |
Posted: Thu Mar 22, 2001 2:17 am |
|
|
|
Guest
|
Alexander Williams wrote:
> On Wed, Mar 21, 2001 at 11:56:56AM -0600, Chris Pressey wrote:
> > "If, for example, an ISDN handler is implemented using five different
> > and related modules. These module should be given names such as:
> > isdn_init, isdn_partb, isdn_..."
> I'm well aware of this. My problem is it rather, well, "sucks."
> "Sucks" isn't too strong for this particular bit, I don't think.
I don't think it sucks. Nested packages are often a sign of
overclassification anyway - then again I'm more familiar with Perl than
Python or Java, perhaps that has coloured my viewpoint. Nested packages
are handy when you have one abstract package (directory) and several
different concrete packages that implement it (subdirectory) - but
Erlang has behaviours that should probably be used instead - one
behaviour and several packages that implement that behaviour.
But I honestly don't mind that it's flat. What I worry about a bit more
(although not too much) are namespace clashes. What if someone else
wants to release a module named 'foo' while I want to release a module
called 'foo'? How does the user that wants to use both of our modules
deal with it? Should I prepend every module I name with some unique
prefix just to be safe? I'd rather not, as that tends to make source
code rather less readable.
_chris
--
"Ten short days ago all I could look forward to was a dead-end job as a
engineer. Now I have a promising future and make really big Zorkmids."
Chris Pressey, Cat's Eye Technologies, http://www.catseye.mb.ca/
Esoteric Topics Mailing List: http://www.catseye.mb.ca/list.html
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
| thantos at telocity.com |
Posted: Thu Mar 22, 2001 4:45 am |
|
|
|
Guest
|
On Wed, Mar 21, 2001 at 08:07:30PM -0600, Chris Pressey wrote:
> different concrete packages that implement it (subdirectory) - but
> Erlang has behaviours that should probably be used instead - one
> behaviour and several packages that implement that behaviour.
The way I generally structure code, I'd have one behaviour directory
with multiple directories beneath for packages, each of which'll
require multiple files, as will the overall behaviour glue. If I'm
trying the impliment an application on top of all this, that's one
more subdirectory over the behaviours.
> called 'foo'? How does the user that wants to use both of our modules
> deal with it? Should I prepend every module I name with some unique
> prefix just to be safe? I'd rather not, as that tends to make source
> code rather less readable.
To use an example from the MU* concept to illustrate the problem
(incidently, I heavily agree with you here):
We have a generic sword with the name sword.erl ... And I want to
build a custom version that inherits the methods of the first one, so
do so ... but call it magic/sword.erl. Makes sense, structurally
... but I can't get to it in a flat access structure.
I've read the description of the Java module system that was
previously posted and like it a lot, except for the inability to
resolve packages with a single import, allowing automatic sub-package
imports.
--
Alexander Williams (thantos_at_telocity.com) | In the End,
"Blue Jester needs food." | Oblivion
"Blue Jester needs fuku-wearing cuties." | Always
http://www.chancel.org | Wins
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
| wuji |
Posted: Sat Sep 15, 2012 5:31 am |
|
|
|
User
Joined: 10 Aug 2012
Posts: 654
|
JCPenney and Chrysler, though, decided not to buy airtime during the episode. episode. designer replica *beep* episode. Wendy's decided not to advertise on "The Ellen Show" at all.A
has changed since the day that show first aired.JCPenney has tapped DeGeneres DeGeneres cheap authentic jordans DeGeneres as its spokeswoman and supported its decision even when One Million
a "pro-family advocacy" group, threatened to boycott the national retail chain for for [h3]cheap Ralph Lauren[/h3] for refusing to fire her.In 1996, a Gallup poll showed that the
approval rating for gay marriage was 27 percent. It is more than than [h4]discount designer *beep*[/h4] than 50 percent today.And there are now 34 shows featuring gay characters
leading and supporting roles -- not including reality TV -- compared to to cheap replica *beep* to only 11 shows in 1997.In the "20/20" interview, DeGeneres said she
willing to risk people knowing."I decided this was not going to be be [h4]cheap Ralph Lauren Polo[/h4] be something that I was going to live the rest of my |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|