1-18-08 ---- ** Announcement ** The official announcement for the Cloverfield project can be found there: [Cloverfield - Announcement] ---- ** Goals ** Along with the general goals listed in the above announcement, here are a few more specific technical goals: *** Language *** Improve the Tcl language syntax on several points to address common criticisms as well as implement missing features. For example : * 'Fix' the comments; * Auto-expand the first word of a command recursively. This will simplify currying and can give great results if namespaces become regular commands (spaces would thus become a valid namespace separator); * Improve variable access : allow e.g. `$$var`, and subscript access such as `var[[1]]` or `var(a)` along with interfaces (see Data structures below); * Allow variable references using the syntax `$&var`. This can fill the gap between current value/reference access semantics, e.g. `lindex` vs `lappend`, and solve many mutability vs. immutability problems; * Add a new quoting rule using parentheses, and drop the `list` command as we know it. For example, `(a b $c)` should be equivalent to `[[list a b $c]]`. The semantics of quotes and braces is preserved (minus changes needed for e.g. comments). Incidentally, this is the same syntax as LISP. * Extend the metasyntax pioneered by the argument expansion operator. This is the most controversial syntax change, but is unfortunately needed by the nature of some changes, like references or LISP-like delayed evaluation. * Define a syntax for specifying references. This can be used for example to serialize circular references, or keep references to variables that go out of scope; for example, `{ref}(a {ref}{})` specifies a list whose second element points to its parent. For more detailed information, see [Cloverfield - Tridekalogue] *** Data structures *** Use ropes as the internal string representation. Ropes will use B-trees of immutable strings. This will give fast concatenation, slicing, insertion, and should dramatically reduce the memory usage and data copying. Use interfaces (à la [Feather]) instead of Tcl_Obj. This should eliminate most cases of shimmering. *** Runtime *** Implement the runtime on existing virtual machines. Primary target is [LLVM]. Secondary target could be Java, .NET, Parrot. LLVM is the most interesting solution since it gives access to JIT compiling, platform independence, native performances, and allow total control over the internal model (contrary to JVM). Moreover, other languages such as C or C++ are already supported, which means that we could get cross-platform [Critcl]-like features for free. To achieve the goal of VM independence, internal data structures should be sufficiently high level. Provide a VM-less, purely interpreted reference platform for embedded and small footprint solutions. ---- ** Related information ** See also [Tcl 9.0 WishList] and all things Tcl9 related. Just found [Tcl/2] as well. Perhaps the first task of the Cloverfield project should be to gather all information related to language improvement? Cloverfield could be an umbrella for all these micro-projects/features/suggestions. I have the feeling that many people share similar views on all these problems, but that there is an overall lack of communication and organization. Cloverfield could be the sparkle that ignites the engine... And yet another couple of discussion pages: [Unified Programming Language], and [If I were to complain]. The more I dig into the wiki, the more I realize that these are very long standing issues, that everybody wants change, that most people agree that some things must be started over, but nobody makes the first move. Tcl needs a vision. Another one: [Tackle]! This one dates back from 2004. I think I've opened a kind of Pandora box. For the better I hope. ---- ** Discussion ** [DKF]: Experience with strings-implemented-as-trees in the past makes me point out that you'd better make sure that you take care to keep the trees balanced. Otherwise you'll have ''terrible'' performance. And using [C] arrays of characters seems to actually work quite well in practice... ''[FB]: Moved discussion to [Cloverfield - Data structures]'' ---- [George Peter Staplin]: Hi FB! I think you have some good ideas. I've read some of your code for [TkGS]. I'm hoping that you can get developers behind this project, and it doesn't become moribund. I am interested. Cloverfield is a good name, and I think it gets away from many old misconceptions about Tcl. [FB]: Thank you! Yes, I hope Cloverfield will get more attention. TkGS scope was a bit too narrow to really get developers on the project. But I've learned a lot working on it, even if the project never completed due to lack of free time (building a family needs a lot of commitment). Anyway I think it is a bit obsolete now, since most of the work involved the creation a new graphic layer, and I feel that Cairo would do the job perfectly. I even had the project to port Tk to Cairo a few months ago, but given the success of [Tile] I came to the conclusion that Tk no longer needed significant improvements (at least for now), whereas Tcl was losing ground, so I moved on to what became Cloverfield. About the name: I chose Cloverfield only a couple of days ago after realizing that the date for the announcement was 18-1-08. But prior to that I made a list of possible names, see: [Cloverfield - Alternate names] ---- [Lars H]: Wow, I think there isn't a single thing on that list that doesn't strike me as completely wrong for Tcl. Fascinating! Well, as long as you're just starting it up as a separate project I suppose I can happily ignore all of it… ''[FB]: I don't want to sound too harsh, but after reading your contributions to all the discussions I found on this wiki regarding language improvements, you seem to be very conservative when it comes to anything that might impact the [Dodekalogue]. Frankly, I don't think that auto-expansion of leading words is totally un-Tclish, given that the same suggestion have been made by several reputable Tclers such as [DKF] of [NEM], and that it currently requires `unknown` hacks to work. And the use of parentheses has been debated in [Tcl 9.0 WishList], see #67. I understand you were against this change, but you should also concede that this change would greatly improve readability and would free the `list` command for other uses. As for the other suggestions, see below.'' I'm a bit surprised, though, that you choose to label [{expand}]-style syntax as the most controversial part — I quite agree it would be a technical necessity after dropping [Everything Is A String] — but perhaps this just means that it is the thing that isn't directly borrowed from some other language. ''[FB]: Well, I felt this was controversial wrt. the debate that preceded the adoption of this syntax change. Many Tclers were concerned that this would open a pandora box. Regarding my suggestions, I tried to limit them to cases where no alternative was viable, i.e. when the changes interfered with the way Tcl interprets the data. I think I managed to get fair compromises. However dropping [EIAS] is totally out of question, because it is at the heart of the Tcl way. On the contrary, if you re-read my suggestions carefully, you'll see that I took great care to enforce this principle to solve some hairy problems (e.g. the representation of circular structures and references).'' Also, I'm a bit surprised about the way in which you propose to "fix" comments; I can't recall ever seeing any requests for ''comment words'' in commands, and it is already perfectly possible to put comments even ''inside'' words, using command substitution: proc \# {args} {} ; # No-op command, for commands. $w[\# {That's the window name}].toolbar[\# {This is a frame}].fire[\# {The actual button widget}] configure -repeatinterval[\# {Delays in auto mode}] 10[\# {A veritable machine gun, this button; 6000 shots per minute}] ''([MS] hopes you don't have a comment like '[[exec rm -rf ~]]')'' ''[FB]: have you ever had to explain to a newcomer why the following code: #if {true} { if {false} { puts something } ''works in an interactive shell but not from source or inside a proc? And why comments inside `switch` blocks sometimes don't work, or give unexpected results? To be successful Tcl needs to follow the principle of least astonishment whenever possible. To be more specific, the problem is not really to "fix" comments but to "fix" the way braces are matched. Hence the changes I proposed to brace matching. The ''comment word'' thing is needed for `switch`-like cases. But my proposal takes great care not to break the [EIAS] principle. OTOH, I don't find the way you choose to implement comments in words to be neither Tclish nor readable (let alone dangerous).'' (If I recall correctly, [dkf] has mentioned in discussions of the [K] combinator that $somevar[[command-returning-empty-string]] does not even cause shimmering in Tcl 8.5, hence no quality degradation of code.) Alternatively, one can do that with ordinary comments, provided one inserts the necessary newlines: $w[# That's the window name ].toolbar[# This is a frame ].fire[# The actual button widget ] configure -repeatinterval[# Delays in auto mode ] 10[# A veritable machine gun, this button; 6000 shots per minute ] But perhaps the point is rather to allow comments in lists written as strings? ''That'' I would often have found useful, but Cloverfield rather seems to turn away from this practice. ''[FB]: on the contrary, that's exactly what Cloverfield proposes. The idea is to modify the way comments are parsed in braced strings. For example : Tcl: > set v {# The next brace close the string } > set v {" The next brace close the string } Cloverfield: > set v {# The next brace doesn't close the string } "neither does this one }" but his one does } > set v {"# This is not a comment"} This introduces an incompatibility but at the benefit of a less surprising behavior. But EIAS is preserved, as the comment is not stripped off the string, but only alter the way braces are matched.'' ---- ** Misc ** Previous speculations over the Cloverfield project were: Monster Manhatten Digital video cameras What does this have to do with Tcl? All cool monsters program in Tcl. Do you suppose that there are monsters in Philidelphia as well [http://wiki.tcl.tk/20100]? ---- !!!!!! %| [Category Cloverfield] | [Category Language] |% !!!!!!