:: Re: [DNG] Tcl as a scripting langua…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Marc Shapiro
Fecha:  
A: dng
Asunto: Re: [DNG] Tcl as a scripting language: 4/2/2025 7pm Eastern Standard time

On 4/3/25 3:07 AM, Didier Kryn wrote:
> Le 02/04/2025 à 23:58, Hendrik Boom a écrit :
>> On Wed, Apr 02, 2025 at 11:32:07AM +0200, Didier Kryn wrote:
> ..
>>>     AFAIR (this was long ago), the very Tcl intrepreter is a function
>>> your C program can call with, through the calling arguments, an access
>>> to C functions belonging to your application. There is, of course a
>>> specific Tcl API these C functions must match to, but this is all
>>> documented. The Tcl command you can invoque from the command-line is
>>> just a main program which calls this function.
>>>
>>>     This very simple but extremely powerfull idea is the very strength
>>> of Tcl in my opinion, the weak point being the primitive and boring
>>> Basic-like syntax of the Tcl language. I just wonder why not all other
>>> interpreters offer the same feature -- IBM's Rexx was doing so.
>> This is also hoe Guile interacts with C programs.
>> And Guile is an implementation of Scheme -- a richer programming
>> language.
>
>     Sure, Guile, IIUC, is a extension of Scheme, which is based on
> Lisp. But, OTOH, Tcl comes with a graphical toolkit (Tk), which is
> uncommon amongst languages, so that it may be used to provide a GUI to
> your application.
>
>     Yet, both languages have this pretty ancient feature I dislike
> which is "everyting is a function": eg arithmetic operators are
> functions and you must express "3+4" as "(+ 3 4)" in Scheme and I
> guess it's the same in Guile. This is a return to the past almost back
> to the primitive pocket calculators for which you would type "3 4 +" .
> BTW Postscript works like this but it was not primarily intended for
> humans. I understand it makes writing the interpreters more trivial,
> but, well! we're in the 21st century and the computer languages should
> adapt to humans, not the opposite. Interpreters and compilers have
> plenty of cpu power and ram available to do that.


I liked the RPN on my old HP 25!  People who only understood algebraic
notation never asked to borrow my calculator a second time.

Marc