From: Andreas Leitgeb on 24 Aug 2006 06:42 Davy <zhushenli(a)gmail.com> wrote: > I notice "Naturally Nagelfar expects the coding style of its author so > if you do things differently, you may get false errors. " > > Can you recommend the coding style used by Nagelfar? I am just a happy every-once-in-a-while user of nagelfar, and I can recommend the coding style used by Nagelfar. I mean, I had no need to reformat any substantial part of my checked code just to hush up nagelfar-warnings. Just a few things, I did change in my sources for nagelfar: use "else" keyword in "if"-statements (this warning could also be separately turned off - I favoured taking the advice of adding some "else"s) complete subcommands: e.g. "info exist ..." -> "info exists ..." Also could be hushed up in nagelfar, but I rather took nagelfar's advice. added ##nagelfar-comments for some procedures that take semantically-special arguments (e.g. varnames) to help nagelfar know, that e.g. the first argument for some proc will be a varname rather than an inadvertent bareword. PS: (PostScriptum, but also addressed to Peter Spjuth :-) lately I failed getting nagelfar to accept version 8.5 stuff (which I think to remember worked previously) - I definitely start nagelfar.tcl with tclsh8.5) e.g.: {expand}.. and lassign
From: Robert Hicks on 24 Aug 2006 08:57 Davy wrote: > Svenn Bjerkem wrote: <snip> > > PS, IMHO, I like Perl more than Tcl :) > I like some things in Perl and some things in Tcl. Tcl has much better OO frameworks (I love Snit) but Perl has the DBI and CPAN. Those 2 keep me using Perl. Though not CPAN so much. I actully think packages are more simple in Tcl than in Perl (but that might be because I am an end user and not a maintainer). The Tcl community is by far the nicest and most informative of all the ones I have participated in (i.e. Python, Ruby, Perl). That is a big plus. Robert
From: Michael Schlenker on 24 Aug 2006 09:20 Robert Hicks schrieb: > Davy wrote: >> Svenn Bjerkem wrote: > <snip> >> PS, IMHO, I like Perl more than Tcl :) >> > > I like some things in Perl and some things in Tcl. Tcl has much better > OO frameworks (I love Snit) but Perl has the DBI and CPAN. Those 2 keep > me using Perl. Though not CPAN so much. I actully think packages are > more simple in Tcl than in Perl (but that might be because I am an end > user and not a maintainer). For something like DBI take a look at the things listed here: http://wiki.tcl.tk/14972 Michael
From: Robert Hicks on 24 Aug 2006 10:10 Michael Schlenker wrote: > Robert Hicks schrieb: > > Davy wrote: > >> Svenn Bjerkem wrote: > > <snip> > >> PS, IMHO, I like Perl more than Tcl :) > >> > > > > I like some things in Perl and some things in Tcl. Tcl has much better > > OO frameworks (I love Snit) but Perl has the DBI and CPAN. Those 2 keep > > me using Perl. Though not CPAN so much. I actully think packages are > > more simple in Tcl than in Perl (but that might be because I am an end > > user and not a maintainer). > > For something like DBI take a look at the things listed here: > http://wiki.tcl.tk/14972 > > Michael Oh, I know all about that. : ) "nstcl" is the closest probably. I haven't used it yet but I am thinking about it. Luckily I use Oracle at work so I can use Oratcl. Todd is a great help. :Robert
From: Peter Spjuth on 25 Aug 2006 03:35 Davy wrote: > I notice "Naturally Nagelfar expects the coding style of its author so > if you do things differently, you may get false errors. " > > Can you recommend the coding style used by Nagelfar? I recommend reading http://wiki.tcl.tk/708. I personally don't follow it all but it's a start. Some style things that are checked are: Indentation, or rather close brace alignment to opening statement. Braced expressions. Since it is generally a really good idea to brace your exprs. Subcommands and options should not be abbreviated. If you do you run the risk of failure if new options are added. Enforce "else", as recommended by the guidelines. /Peter
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: How can I debug DLL loading? Next: Embedding Tk in an MFC application |