When comparing Tcl vs V, the Slant community recommends V for most people. In the question“What is the best programming language to learn first?” V is ranked 4th while Tcl is ranked 31st. The most important reason people chose V is:
V is easier than C and fast like C.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
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.
Pro Fast like C
V is easier than C and fast like C.
Pro C Interop
Can import C libraries, structs, and headers.
Pro Cross-platform
Compile to many OSes.
Pro Simplicity
V is simple and powerful.
Pro Can create multi-OS GUIs
Multi-OS GUI creation is more integrated into the language than others.
Pro Clear syntax
Highly understandable language.
Pro Sum types
V has Sum Types.
Pro Generics
V has generics.
Pro Closures
V has closures, which gives the user additional options and usefulness.
Pro Safety
V is very safe.
Pro Single paradigm
Follows the philosophy that there should be only one way to do something, as opposed to multi-paradigm languages like C++.
Pro Supports concurrency and channels
Can run functions concurrently that communicate over channels.
Pro Fast compile times
Compiles programs fast, less waiting around, so more productive and fun.
Pro Friendly and helpful community
Just check the V Discord channel or their GitHub Discussions and you will see by yourself.
Pro Inline assembly
Can add Assembly code.
Cons
Con Rapid changes in a language syntax/features
Since V language under a continuous development and core syntax and features will be "frozen" in a version 1.0.0, updating from older version of a language can cause a code rewrite of previously working program.
Con V 1.0 release was planned for December 2019
The first version of the language was publicly released in June of 2019, version 0.1.x. First beta version of the language was released June of 2022, version 0.3. x. Language has progressed faster than most. Welcomes contributors to join the project.