RE: https://mastodon.social/@h4ckernews/115665782709337151

As usual, Python catching up with something Tcl has had for at least a decade with the ‘tailcall’ command. 😜
#programming #tcltk #python

@CGM I see good in this: new and useful powers for #Python.

I see bad in this: a thing we knew about for a long time, present elsewhere, why so long coming?

I see neutral in this: things that can be provided by libraries instead of directly in the language should absolutely start in a library. If they earn a spot in the language itself, great.

I see sad in this: these words make it sound like #TCL is ahead and Python is behind overall. That doesn’t match my opinion or personal experience. Absolutely agree on this particular feature. And also I have stated many times "there is no best language", just choices more or less cost-effective for the problem at hand.

For the problems I’ve faced, with the tools I’ve had available, Python has been a more cost-effective choice than TCL the majority of the time. From your words, I took that you prefer TCL. Nothing wrong with that!

#LanguageDesign #TailCallOptimization

@YesJustWolf Sorry, my post was a bit snarky, and I am somewhat biased.

Obviously Python is way ahead of Tcl in popularity. So I find it galling to every so often read about some great new Python feature which turns out to be something Tcl had decades earlier. Other examples are:
- Unicode support properly integrated into the language rather than an awkward add-on.
- Using multiple interpreters to get multithreading that's not hobbled by a Global Interpreter Lock.
Your mileage may vary 😎

@CGM I think you are highlighting an endemic and significant problem: people get comfortable instead of curious. They don’t look around. If something doesn’t exist in their daily tools, that thing doesn’t exist at all. They’re not willing to look farther. If they really need it, they’ll write it from scratch. As though other tools have no value and/or simply aren’t worth investigating. Blah, blah, blah, "doomed to repeat it". Stay curious! I approve of you knowing that TCL already has tail-recursion. Why isn’t this known more widely?

@YesJustWolf Well these days there is just so much stuff that no-one can keep up with it all. When I started programming things were simpler. Within a few years I had tried out Algol, Fortran, Snobol, Lisp, Prolog, Basic. Now there are also strong "network effects" that push you towards sticking with tools that are well-known/widely-supported/sought-after-for-employment, etc.

I wrote something a while back about why I particularly like Tcl: https://colin-macleod.blogspot.com/2020/10/why-im-tcl-ish.html .

Why I'm Tcl-ish

Colin Macleod Dundee Barnet Greece Tcl C++ Bloomberg Alcatel Intrasoft Autism

@CGM I never heard of #SASL! I have always been a huge #Wirth fan. Did tons of real-life work in #Pascal, moved through #Modula2 up to, finally, #Oberon2. Had such fond memories of it that I tried to use it last year for #AdventOfCode and learned that it was not nearly as good as I remembered. Have you tried #Racket (a kind of #Scheme)? It’s not for me but it’s interesting. Used it in a job interview once. Your description of how flow control is defined in #TCL really reminds me of Racket. I’m learning #RustLang and having the kind of #Macros you get in #Lisp and Scheme is another reason Rust is so enjoyable.
@YesJustWolf No, I've never tried Racket. I did work professionally for a while on a project that used Common Lisp to drive a telecoms management system though. 😀
@CGM Thinking back, there were so many wonderful things in these languages, even languages that for one reason or another essentially went away. My best friend is a #Perl expert (which I used at #Slashdot). I love that Perl has regular expressions built-in to the language; but I don’t want to write Perl anymore. I loved the way #Oberon2 connected functions to types.
@CGM Oh, I should have noted that I previously worked at the Qt Company (back when it was Trolltech) and my current job builds on #Qt, so I’m on the other side of the fence from #Tk.