For Programmers: Free Programming Magazines  


Home > Archive > Tcl > December 2007 > tc Vs JavaScript - Correct ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author tc Vs JavaScript - Correct ?
helen.ackers@googlemail.com

2007-12-29, 7:17 pm

Hello

I wonder if it would be correct to compare tcl with Javascript as
scripting languages used in Web pages ? Could you please guide me to
an article which points out the differences between Javascript and tcl
as scripting languages?


Many thanks
Helen
Bryan Oakley

2007-12-29, 7:17 pm

helen.ackers@googlemail.com wrote:
> Hello
>
> I wonder if it would be correct to compare tcl with Javascript as
> scripting languages used in Web pages ? Could you please guide me to
> an article which points out the differences between Javascript and tcl
> as scripting languages?


javascript is available in every modern browser. Tcl is not.

That pretty much sums up the major points :-)
Eckhard Lehmann

2007-12-29, 7:17 pm

helen.ackers@googlemail.com schrieb:

> I wonder if it would be correct to compare tcl with Javascript as
> scripting languages used in Web pages ?


Tcl is a general programming language, more general than JavaScript. I
don't know all the application areas of JS, but afaik it is part of HTML
pages that are sent as a response to the client browser and it is
interpreted in the browser environment.
This is not the case for Tcl. You can think of Tcl more as a server
side/CGI language in this context. Like Perl or PHP, it can *generate*
HTML pages on the server and send it to the client. It can be well used
in conjunction with JS and AJAX. But if you are looking for a language
that is interpreted in/from a web browser, there is no real alternative
to JavaScript (unless you want propietary MS stuff.. I think they have
something simmilar that works just in IE)

Eckhard
Cameron Laird

2007-12-29, 7:17 pm

In article <rPvdj.27461$4V6.8317@newssvr14.news.prodigy.net>,
Bryan Oakley <oakley@bardo.clearlight.com> wrote:
>helen.ackers@googlemail.com wrote:
>
>javascript is available in every modern browser. Tcl is not.
>
>That pretty much sums up the major points :-)


Bryan's right, as always.

Back when Netscape was first thinking of building JavaScript into
its browsers--before it was called JavaScript, incidentally--there
was consideration of Tcl in its place. Technical merits were
.... secondary in standardization on the former, from all I know.
Gerald W. Lester

2007-12-29, 7:17 pm

Eckhard Lehmann wrote:
> helen.ackers@googlemail.com schrieb:
>
>
> Tcl is a general programming language, more general than JavaScript. I
> don't know all the application areas of JS, but afaik it is part of HTML
> pages that are sent as a response to the client browser and it is
> interpreted in the browser environment.
> This is not the case for Tcl. You can think of Tcl more as a server
> side/CGI language in this context. Like Perl or PHP, it can *generate*
> HTML pages on the server and send it to the client. It can be well used
> in conjunction with JS and AJAX. But if you are looking for a language
> that is interpreted in/from a web browser, there is no real alternative
> to JavaScript (unless you want propietary MS stuff.. I think they have
> something simmilar that works just in IE)


To expand on that.

Tcl has been used to write web application servers such as AOLserverm
TclHttpd and WUB -- this is far beyond what anyone has done in JavaScript.

So I guess the big question is -- what *exactly* do you mean by "used in Web
pages" (i.e. what are you really asking)?


--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Arjen Markus

2007-12-30, 8:11 am

On 29 dec, 23:27, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> Eckhard Lehmann wrote:
>
>
>
> To expand on that.
>
> Tcl has been used to write web application servers such as AOLserverm
> TclHttpd and WUB -- this is far beyond what anyone has done in JavaScript.
>
> So I guess the big question is -- what *exactly* do you mean by "used in Web
> pages" (i.e. what are you really asking)?
>


Note that there is a basic implementation of Tcl in JavaScript - see
the Wiki
(http://wiki.tcl.tk) and look for tcljs (IIRC)

It is mostly a proof of concept, but it gets around the limitation of
Tcl not
being supported by browsers unless you have the Tcl plugin installed.

Regards,

Arjen
Cameron Laird

2007-12-30, 8:11 am

In article <a0cd9c9e-3b2c-4134-a394-9a532e783679@j20g2000hsi.googlegroups.com>,
Arjen Markus <arjen.markus@wldelft.nl> wrote:
Alexandre Ferrieux

2007-12-30, 7:22 pm

On 30 d=E9c, 14:51, cla...@lairds.us (Cameron Laird) wrote:
>
> Notice in particular there the similarities between
> JavaScript and Tcl Richard and others highlight.


Also, one nice similarity is the event-driven model. Basically a
JavaScript context is single-threaded, with many various event
handlers exposed by the environment (browser or other). So, none of
the concurrency nightmares you may encounter with Java.

In this vein, [after] is setTimer(JavaScript)/
setInterval(ActionScript).
You don't even have the (risky) [update], but it's OK because it
induces you to re-organize your code to do better (i.e. chain
callbacks).

No such low-level objects as sockets and fileevents, but similar
functionality with XMLHttpRequest (JavaScript) and
XMLSocket(ActionScript).

-Alex
Why Tea

2007-12-31, 4:32 am

On Dec 30, 2:22 am, helen.ack...@googlemail.com wrote:
> Hello
>
> I wonder if it would be correct to compare tcl with Javascript as
> scripting languages used in Web pages ? Could you please guide me to
> an article which points out the differences between Javascript and tcl
> as scripting languages?


To keep things simple; I'd like to think of it this way, Tcl is
interpreted in the OS domain and Javascript in the browser domain.
Furthermore, if you are familiar with other scripting languages, Tcl
is in the same category as Perl, Python, etc. Hence, you should use
Javascipt in your Web pages (client side programming), but you can use
Tcl as your cgi script (server side programming) just like Perl.

/Why Tea
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com