When comparing Brainfuck vs Tcl, the Slant community recommends Tcl for most people. In the question“What is the best programming language to learn first?” Tcl is ranked 31st while Brainfuck is ranked 76th. The most important reason people chose Tcl is:
Unlike *sh Tcl has a rich standard library.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Great exercice for your brain
If you ever succeed to use it at least once, whatever it does, you will never be afraid to learn any other programming language.
Pro Very good introduction in geek communities
Say you made a Brainfuck program once, and count how many geeks you will attract.
Pro Designed to challenge and amuse programmers
Rather than have a practical application, Brainfuck is an esoteric language for the purpose of challenging programmers who want to code in a more unusual language.
Pro Standard library
Unlike *sh Tcl has a rich standard library.
Pro Sane quoting rules
Unlike in sh you don't need to quote your variable substitutions ('"$1"').
Expanding of arguments occurs mostly explicit and if yet expected in-place (e. g. using eval
or subst
) it follows strict and well clear rules.
So exec test $argv
would execute test with single argument.
And appending {*} before $argv
would execute test with all arguments (list expansion).
Pro Cross-platform
With a little care you can have the same script work on Linux, *BSD, OS X and Windows.
Pro Widely available
You can expect a reasonably recent version of Tcl to either installed or available in the repositories of any popular open source *nix.
Pro Everything is a string
Tcl can operate at the same level of abstraction as the POSIX shell, which makes it easier to manipulate the output of other programs.
Pro Tk and Expect
Pro Standalone packages
Tcl enables easy deployment through self-contained binaries known as starpacks.
Pro Rich scripting capabilities on a single line
Want to run something 5 times? Here you go: set i 0; time { puts done-[incr i] } 5
If you need real conditional cycle? Not a problem: for {set ready 0; set i 1} {$i <= 100 && !$ready} {incr i} { if {[exec do-some-thing] eq "ready" } {set ready 1} }
Want to measure performance of something or repeat it max 300 times and not longer than 1 seconds? Very simple: timerate { after 20 } 1000 300
How about notifying yourself when some http-server is back online? Sure thing: while {[catch { close [socket localhost 80] }]} { after 1000 }; puts "\7\7\7ONLINE!"
And you can do it also fully asynchronously using events etc.
Cons
Con Esoteric language
Brainfuck is by design extremely difficult to use. This makes it un-learnable to beginners.
Con Impractical language, used only as a toy
It won't get you a job. It is not used in any practical application.
Con It's a joke language
Con Almost as bad as Python, but less adopted.
It's a joke, just like Python, but at least brainfuck admits it ;-)
Con R-rated name
It's difficult to talk about in polite company.