From: Quokka on
Bryan Oakley wrote:
> Cameron Laird wrote:
>
>> ? Bryan, I'm confused; while I certainly involve plenty of Makefiles
>> in my Tcl-based work, I don't see it as pertinent to the advice at
>> hand. As I read your response, you're suggesting transformation of
>>
>> big_monolithic_source.tcl
>>
>> into
>> main.tcl
>> case1.tcl
>> input_output.tcl
>> other_stuff.tcl
>> ...
>>
>> where main.tcl might look like
>>
>> source case1.tcl
>> source input_output.tcl
>> source other_stuff.tcl
>> ...
>>
>> main
>>
>
> No. The way I use makefiles is something like this:
>
> foo: main.tcl casel.tcl input_output.tcl other_stuff.tcl
> cat main.tcl casel.tcl input_output.tcl other_stuff.tcl
> # this assumes main.tcl defines the proc "main"
> echo "main" >> foo
>
> I pretty much never use the source command except when debugging.
>

Um... Yuck!

I can not see the advantage in this at all!
Why would you do this instead of sourcing the files?

Paul
From: Bryan Oakley on
Quokka wrote:

> Um... Yuck!
>
> I can not see the advantage in this at all!
> Why would you do this instead of sourcing the files?
>
> Paul

Because I like not having to worry that one of the files I need got
accidentally deleted or replaced by some wimpy hacking attempt. Just a
matter of philosophy I guess; I've never used the source command in
production code (where "never" means "for the last ten years or so").

Why is it "yuck!"? What does it matter what the code looks like at
runtime? My motto is, do what works best for you. For me, this works best.
From: Cameron Laird on
In article <W05Od.6688$D34.5866(a)newssvr12.news.prodigy.com>,
Bryan Oakley <oakley(a)bardo.clearlight.com> wrote:
>Quokka wrote:
>
>> Um... Yuck!
>>
>> I can not see the advantage in this at all!
>> Why would you do this instead of sourcing the files?
>>
>> Paul
>
>Because I like not having to worry that one of the files I need got
>accidentally deleted or replaced by some wimpy hacking attempt. Just a
>matter of philosophy I guess; I've never used the source command in
>production code (where "never" means "for the last ten years or so").
>
>Why is it "yuck!"? What does it matter what the code looks like at
>runtime? My motto is, do what works best for you. For me, this works best.

Tcl is different from other languages. Well, *all* languages are different
from others--but Tcl is different in a different way. It's about a
technology and style rather than syntax or functionality. When you're
gluing pieces together rapidly and comfortably, you're likely using Tcl.

This means, though, that different *good* Tcl programmers (and Bryan
certainly counts among those) have projects that look nothing at all
alike. Bryan never [source]s, I never [place] (and only began to [grid]
around 2000), Don Porter, the expert in [pkg*], tries not to use them,
and still other top-notch developers don't use Tk, or only use Tk, or
don't know Expect, or write only big programs, or only small programs,
or ...

Tcl works for all of us.
From: Michael A. Cleverly on
On Wed, 9 Feb 2005, Cameron Laird wrote:

> When you're gluing pieces together rapidly and comfortably, you're
> likely using Tcl.

QOTW?
From: D.Millin on
Everyone, thank you for replying. The script that I have been working
on as a learning exercise is a variation on passmass. The script
prompts a user for a list of their passwords, and the old and new root
password. The script then gets a list of valid passwords for a user
reads a file, to obtain hostname, IP, and protocol, before attempting
to log onto a number of different variants of unix
as a specified user, and switching to root.

The script was written in a linear fashion, and is about 11k. Because
of the layout or should I say,
the lack there of, adding additional functionality to handle expired
password is a bit cumbersome.

First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Next: Newbie Tcl/Tk build problem