Live data from Hacker News

Tcl the Misunderstood (2006)

antirez.com

51–60 of 81 posts

Re: Tcl the Misunderstood (2006)

#51
post #23

Watching someone learns basics of programming in Python, I realized that Python is actually not that easy to learn for beginners as I thought: 1. Types in Python are implicit. It's really hard to explain that they need to always think about what type something is, especially when they haven't grasped the concept of types yet. 2. Indentation as part of the language. I thought it's a great thing for beginners, but it's…

Lua is the new tcl and is great.

Re: Tcl the Misunderstood (2006)

#52
post #44

Some discussions over the last several months, including just yesterday: * The Birth of Tcl: https://news.ycombinator.com/item?id=31111220 * TclTutor 3: https://news.ycombinator.com/item?id=30327945 * Tcl/Tk Spline Editor: https://news.ycombinator.com/item?id=29772621 * Tcl library for CSP: https://news.ycombinator.com/item?id=29421786 * Why Tcl syntax is so weird: https://news.ycombinator.com/item?id=29143346 * Tcl:…

Yes. I've been kind of wondering about the apparent promotion of Tcl here recently - is someone pushing it for some reason, or is it just a passing fad in a slow (tech) news time?

I think topics tend to cluster as people follow up on interesting posts; at least, that would explain two active discussions in two days.

Re: Tcl the Misunderstood (2006)

#53
post #17

expr is horrible though. but i love tcl.

It's easy to alias expr to =, which enhances write- and readability :

  % interp alias {} = {} expr
  =
  % set x [= 2 + 3]
  5
Also aliasing lindex to @ is nice

  % interp alias {} @ {} lindex
  % set a {1 2 3}
  1 2 3
  % @ $a 1
  2

Re: Tcl the Misunderstood (2006)

#54
post #44

Some discussions over the last several months, including just yesterday: * The Birth of Tcl: https://news.ycombinator.com/item?id=31111220 * TclTutor 3: https://news.ycombinator.com/item?id=30327945 * Tcl/Tk Spline Editor: https://news.ycombinator.com/item?id=29772621 * Tcl library for CSP: https://news.ycombinator.com/item?id=29421786 * Why Tcl syntax is so weird: https://news.ycombinator.com/item?id=29143346 * Tcl:…

Yes. I've been kind of wondering about the apparent promotion of Tcl here recently - is someone pushing it for some reason, or is it just a passing fad in a slow (tech) news time?

Years back, for a lot of us, tcl and tk was the bees knees. It was what we use Qt for now, but much easier in some regards. I think sometimes that as we reach peak saturation in other languages people branch back out into areas we enjoyed in the past

Re: Tcl the Misunderstood (2006)

#56
post #34

Wow, looks like TCL is "the better bash"

Someone else posted a great link explaining why you probably don't want tclsh or wish as your login shell.

Today zsh or fish is the better bash, really.

Here's another dead end unexplored though - dtksh! https://www.brendangregg.com/dtkshdemos.html

Re: Tcl the Misunderstood (2006)

#59
post #36
post #23

Watching someone learns basics of programming in Python, I realized that Python is actually not that easy to learn for beginners as I thought: 1. Types in Python are implicit. It's really hard to explain that they need to always think about what type something is, especially when they haven't grasped the concept of types yet. 2. Indentation as part of the language. I thought it's a great thing for beginners, but it's…

The traditional answer was to use a BASIC dialect. Minimal syntax, minimal structure, simple imperative commands. A lot simpler than Pascal. I don’t know TCL very well, but its scope semantics may be confusing. I’d take a look at LOGO also.

+1 for LOGO. It's a great pedagogical language, and many primary school children would benefit greatly from its return to wide usage.

Re: Tcl the Misunderstood (2006)

#60
post #17

expr is horrible though. but i love tcl.

It's easy to alias expr to =, which enhances write- and readability : % interp alias {} = {} expr = % set x [= 2 + 3] 5 Also aliasing lindex to @ is nice % interp alias {} @ {} lindex % set a {1 2 3} 1 2 3 % @ $a 1 2

Also, if you set your namespace path like so:

namespace path {::tcl::mathop ::tcl::mathfunc}

Then you get very LISP like math operators

  % set x [+ 2 3 [- 5 20]]
  -10
and math functions

  % set x [abs -12]
  12
Post reply on HN