Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: About Standards and Best Practices

From: andrew:martin:colenso:school at: 2-Sep-2003 14:56

> What I'm asking is just a few tips such as: > 1) create objects when ....
Use objects when the names in the script look something like this: Bla_foo: ; Rebol value here. Bla_bar: ; Rebol value here. Bla_thing: ; Rebol value here. Turn the above into: Bla: make object! [ foo: ; Rebol value here. bar: ; Rebol value here. thing: ; Rebol value here. ] Why? An object keeps things together that work together and makes it obvious.
> 3) call various scripts or code everything in one file...
Or the third option, put one's common functions into files of their own making a library of files/script/values, then assemble them automatically into a larger script/file for distribution. Why? Minimises redundancy, and there's only source. If a mistake is found in a library file, one only needs to correct it one place, then reassemble any distributions that rely on that script/library (or even just re-assemble them all if not lazy). Just my opinion. Andrew J Martin Attendance Officer & Information Systems Trouble Shooter Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]