4 ms·
Actually if you look at the syntax from a mathematical point of view, Tcl synax is much simpler. Also behind the clean Python look (that almost seems pseudo co
by antirez 17y ago
Actually if you look at the syntax from a mathematical point of view, Tcl synax is much simpler.
Also behind the clean Python look (that almost seems pseudo code in simple programs) the Python semantic is really complex compared to the one of Ruby for instance.
- gaius 17y agoYep, the 12 rules and that's all there is to the language. Tcl is really well designed and elegant. It's almost a Lisp, but one that has the libraries and installed base that it can be used for production work. e.g. it's easy to add your own control structures to the language
- swannodette 17y ago>It's almost a Lisp, but one that has the libraries and installed base that it can be used for production work. >e.g. it's easy to add your own control structures to the language Huh? You obviously don't know Lisp. Between PLT Scheme and Common Lisp you have several metric tons of libraries. And Common Lisp is certainly used for serious production work. And finally, Lisp like freaking invented adding your own control structures to the language.
- gaius 17y agoYes, 50 years ago Lisp was 30 years ahead of everyone else. Things have moved on, tho'.
- swannodette 17y agoI've used more than few languages professionally or academically (C, C++, Objective-C, Java, JavaScript, Python, Scheme) and it still seems to me that most languages are still trying to catch up. This isn't to say I don't enjoy these languages. But to say that things have moved past Lisp, that's laughable really. I mean, I don't even have garbage collection on my iPhone (and I really dig Objective-C).
- gaius 17y agoIt's not just the language, it's the ecosystem and community around it.
- davidw 17y agoOne thing that Tcl, Perl, Python, Ruby, et al have going for them is that they are "promiscuous" in that they tend to play well with C, and other systems. Lisp and Smalltalk are capable of doing that, of course, but there seems to be much more of a culture of "turtles, all the way down", where that sort of happy-go-lucky interaction with the rest of the world is not always looked upon positively.
- prodigal_erik 17y agoC and its "undefined behavior" are behind most of the litany of security disasters and unstable apps we have all endured. It can be expedient to reuse C code, but in the long run we're better off replacing it with something more reliable.
- silentbicycle 17y agoThe uncomfortable trade-offs involved in working with what's available vs. replacing the whole stack with something done right are the heart of the "worse is better" paper. For better or worse, if you want to replace C, you have to dig deep.
- moe 17y agoPython semantic is really complex compared to the one of Ruby for instance. Wrong. The opposite is true. See their respective grammar dependency graphs. Ruby: http://farm1.static.flickr.com/93/280661836_e477a01932_o.jpg http://farm1.static.flickr.com/93/280661836_e477a01932_o.jpg Python: http://farm1.static.flickr.com/80/281055485_cc5069b990_o.jpg http://farm1.static.flickr.com/80/281055485_cc5069b990_o.jpg (Source http://laurentszyster.be/blog/jruby-vs-cpython/ http://laurentszyster.be/blog/jruby-vs-cpython/)
- fhars 17y agoThat doesn't refute the statement that the semantics behind the simple looks of python are complex. All that the simple grammar shows is that python looks simple. That was a given.
- moe 17y agoI'm not sure what you mean, can you elaborate? Python is specifically built around the concept of "One and only one way to do it". (Source: http://www.python.org/dev/peps/pep-0020/ http://www.python.org/dev/peps/pep-0020/) Ruby is specifically built around the perl motto of "There's more than one way to do it". (Source: http://www.artima.com/intv/ruby3.html http://www.artima.com/intv/ruby3.html) Claiming that python semantics were more complex than ruby semantics just makes no sense to me when the difference is even clearly stated in their respective design goals.
- fhars 17y agoThe point is that the diagrams you linked to don't tell you anything about the semantics. For example, according to the python diagram, there is absolutely no difference except for the parameter definition between what is allowed in a normal function definition and a lambda expression. The subtlety that a lambda can only be a single line is lurking in some surprising and dark corner of the language semantics. That is what makes a language difficult: arbitrary and subtle differences between things that should be the same. Not that the three sligthly different types of callable objects/blocks/watchamaycallits in ruby are a shining example of elegant design. I don't know if ruby or python is simpler (I don't care, scala is even more baroque around the corners than both and I still prefer it), it is just that your syntax diagramms add nothing to a discussion about semantics.
- lokijuhyghj 17y agoBut if you look at it from the point of view of say, having to count from 1-10 the syntax is horrible. The real killer for TCL initially was having to build extensions into the binary. If a lib needed BLT you had to rebuild TCL with BLT, then another library need a conflicting add-in you ended up with multiple TCL installs and a dll-hell of trying to get the right libs to play nicely. Don't know if thats fixed.
- davidw 17y agoIt has been fixed for over 10 years. It is Tcl, by the way, not TCL.