Re: Viewing packages in mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg102776] Re: Viewing packages in mathematica
- From: David Reiss <dbreiss at gmail.com>
- Date: Thu, 27 Aug 2009 06:32:35 -0400 (EDT)
- References: <h6tv6v$drb$1@smc.vnet.net> <h7375b$b64$1@smc.vnet.net>
Take a look at the code that I posted at http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread= /thread/fc042346d1fc78fd --David On Aug 26, 7:43 am, Yves Klett <yves.kl... at googlemail.com> wrote: > John, > > if linewrapping is just a rendering option in the editor, why not let > the user decide if he likes it or not? If no permanent changes were made > to the m-file itself, there should be no harm done. Enabling > line-wrapping in any old editor usually does not change the file as such.= .. > > The non-existent linewrapping for "Code" cells makes editing complex > long cells quite painful and seems for my taste something that would > people put off using the otherwise very nice new package editing > features in the frontend. > > As for workbench, surely there is an option there to enable > line-wrapping (dunno, though)? > > Regards, > Yves > > John Fultz schrieb: > > > > > I should make it clear that none of your reasons apply to the package > > editor in the Mathematica front end (available by opening a package > > file or through the menu item File->New->Package). You can edit > > packages directly using that editor with all of the formatting, syntax > > coloring, cell types and grouping on package files which are completely > > interchangeable with Workbench or any other text editor you might favor > > for working with package files. > > > There are a couple of things that you don't get which you would get > > with regular notebooks. As the original post points out, you don't g= et > > line-wrapping in Code cells. This was a deliberate design decision o= n > > our part. We wanted to create a package editor which would be comple= tely > > interchangeable with Workbench and other systems. Therefore, two of = the > > design goals were to limit the automatic formatting changes introduced = by > > the front end when displaying/editing a package file, and to minimize t= he > > markup introduced into the package file by the front end when encoding > > cell group structure, cell styles, etc. > > > I personally think we've struck a pretty good balance, although there > > are a few suggestions for features which remain to be implemented. > > Others on this forum (and perhaps even within Wolfram) may disagree, > > and that's fine. There are many options for editing package files. > > Some people are very happy with Workbench, some with their own text > > editors, some with the FE's package editor, and some with notebooks > > auto-saved as packages. All will continue to be supported for as far > > in the future as I can predict. > > > Sincerely, > > > John Fultz > > jfu... at wolfram.com > > User Interface Group > > Wolfram Research, Inc. > > > On Sun, 23 Aug 2009 05:32:59 -0400 (EDT), David Park wrote: > >> I agree with you that I would much prefer to have Mathematica notebook= s as > >> the primary source for package code. The reasons are: > > >> 1) You get the automatic formatting. > >> 2) You get syntax coloring. > >> 3) You can include Text cells for notes on the code. > >> 4) You can use sectional grouping so you don't have just one long scro= ll. > >> 5) You're not completely committed to Workbench. > > >> One of the major problem with creating .m files in Workbench is that i= f > >> you Import the code from a regular existing package then the .m code d= oes > >> not line wrap. This makes it very difficult to read and to modify. > >> However, if you copy and paste code from an existing notebook then it > >> does line wrap. > > >> Making .m files the primary source of package definitions is a signifi= cant > >> obstacle to users who would prefer to stay closer to mathematics than = to > >> computer programming. > > >> It would be nice if Workbench included a mechanism similar to the auto > >> generated package mechanism that would generate line wrapping .m files=