[Jprogramming] library suggestion
Sherlock, Ric
R.G.Sherlock at massey.ac.nz
Tue Jul 20 06:12:46 HKT 2010
> From: bill lam
> Sent: Monday, 19 July 2010 10:44
>> I like the J7 stdlib.ijs deployment model. IMO loading a single script
> is simple and straightforward than loading a chain scripts.
Surely from a user's point of view there is little difference? In both cases
require '~system/main/stdlib.ijs' will provide the same functionality.
Keeping the scripts separate has a number of benefits IMO:
* keeps the source scripts more similar to the distributed scripts, and the path from source to distributed script simpler and clearer.
* keeps the functionality more componentized for those who wish to pick and choose functionality to include in their own applications (those who do not want to pick and choose can still simply load stdlib.ijs)
* documentation within the scripts (which should be retained enabling help facilities like scriptdoc and namedoc to continue to work), will be more targeted and wouldn't need to be replicated in a separate location
* the new Ignore_j_ functionality introduced in j7 to retain compatibility with j6 becomes redundant - e.g. 'files' in script.ijs/Public.ijs can still point to the actual files.ijs script.
I think that the main objection that I have to this merging of scripts in stdlib.ijs (as opposed to say jzplot.ijs) is that the scripts being merged have no real relationship to each other apart from the fact that they are commonly used. That just feels somehow wrong to me ;-)
Ric
> Пнд, 19 Июл 2010, Sherlock Ric писал(а):
> > It seems to me that the main issue you have come up against is that
> it is sometimes not trivial to resolve the relationship between the
> source scripts used for development and the distributed scripts.
> >
> > As I see it there are (at least) a couple of ways of handling this.
> > A) Leave things as they are but better document how these more
> complex
> > projects are built
> > B) Do as you suggest and ship the source scripts with added
> infrastructure
> > to build/load the component scripts on the fly
> > C) Decreasing the complexity of the projects by making the component
> > source scripts longer, but using sections and code-folding to
> retain the
> > navigability of the project:
> > http://www.jsoftware.com/pipermail/beta/2010-June/004050.html
> >
> > With regards to comments/documentation I fully agree that it should
> not be stripped out of library scripts. As Devon suggests, this is
> optional in Project Manager (both 6.02 & 7.01) and could be easily
> changed.
> >
> > On a related matter, in the current J701 beta a number of often-used
> scripts (e.g. files, strings, dll ...) are now loaded by default (as
> part of stdlib.ijs script) when booting J. Basically the old scripts
> are now source scripts for the project that generates the stdlib.ijs
> script. As such the comments are stripped and the individual scripts
> are no longer shipped to users as part of the base library. I like the
> fact that these scripts are now loaded at boot by default, but would
> prefer that the individual scripts be retained and loaded or required
> by stdlib.ijs rather than catenated as one big stdlib.ijs script.
> >
> >
> > [---=| TOFU protection by t-prot: 30 lines snipped |=---]
>> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008年08月24日
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list