You are here

Sugar 0.1

admin의 아바타
첨부 파일파일 크기
Binary Data sugar-0.1.tar.gz9.68 KB

홈페이지 :
참고 :

Sugar is a macro system for the Tcl programming language, with a design very similar to Lisp macros.

This document will try to explain what Sugar macros are, how they can be applied, and why I think they improve the Tcl language.

Every time I refer to the term macro in this document, I mean a Sugar Tcl macro if not better specified.

Note that the idea of a macro system for Tcl is not new, but as far as I know, there is not implementation that is comparable with Sugar in terms of usage and design principles. Something of similar in the spirit, is the Tmac - a Tcl macro processor package, but it works by pattern matching and substitution, requires the user to use a special syntax, does not guarantee the expansion to happen only where actually a command can be called, and can't be used to add arbitrary new syntax to Tcl (syntax macros feature of Sugar), nor complex code transformation (see for example the transformer macro to optimize tail calls in this document).