On 2002.11.11, Jeff Hobbs <[EMAIL PROTECTED]> wrote:
> Ah ... Vignette.  If I could find the people responsible for the original
> design of the Vignette/Tcl integration, I would give them a good smack in
> the head.

Come on, of all the commercial applications of Tcl, Vignette's probably
made the most money of 'em all.  Considering they originally integrated
Tcl7.6, it's not like their lives were /that/ easy, either ...

> I'd put good money on the bet that one of them was a COBOL or like
> language user.

Now, now ... ;-)

> If you look at the implementation, you'll see what I mean.  All-caps
> commands? set and SET command that mean different things?  Come on.

Fundamentally, this is what SET does:

    proc SET {var value {noeval ""}} {
        global $var
        if [string match $noeval NOEVAL] {
            set $var $value
        } else {
            set $var [eval $value]
        }
        return
    }

So, when you're using it inside a display template:

[SET foo bar]

It sets a global variable for you, and avoids the unpleasant side-effect
of [set] which returns the value.  The typical work-around might look
like:

    [
    set foo bar
    set bar baz
    set baz bing
    NULL
    ]

Where [NULL] might look like:

    proc NULL {} {
        return
    }

This keeps things silent when using things like SET, but allows other
procs to return their output directly into the outgoing data stream.

At a basic level, delivering a Vignette template is just taking the
contents of a file (the "template") and pushing it through [subst].  In
that regard, embedding a [set foo bar] inside the template has that
unpleasant effect I mentioned earlier, so they used "SET" as a
convenience.

As I said, I'm ready to implement as much of the Vignette Tcl API as I
can so I can take Vignette templates and deliver them from AOLserver.
I wonder if I can legally do that ... hmm ...

> They also didn't understand Tcl when they made the integration.

I think lots of folks who work with Tcl and integrate Tcl don't really
understand Tcl at first.  ;-)

> Scriptics supported them, but they were always so closed about sharing
> their internal integration layer that it made things very difficult.  Ugh!

They intended to make money off their work.  It makes people want to
believe that not sharing details will help them make more money.
*chuckle*  Like the cat's not going to get out of the bag, once you sell
your first license ...

-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)

Reply via email to