larry wall's take on languages
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
a good read - a lot of it over my head though (what's a twigil?)
Perhaps there should be a scripting version of LISP...? :)Is LISP a candidate for a scripting language? While you can certainly write things rapidly in it, I cannot in good conscience call LISP a scripting language. By policy, LISP has never really catered to mere mortals.
And, of course, mere mortals have never really forgiven LISP for not catering to them.
;)We're getting rid of some of our punctuation
from wikipedia
A sigil... ( pl. sigilia or sigils) is a symbol created for a specific magical purpose.
In programming, it is a "magical symbol" (LOL) post-fixed to a word to give it "special" meaning. For example, 'text$'. '$' informs one that the variable 'text$' holds text.
He explained in the doc that a twigil is a second sigil, so that the word now has a SECOND bit of "magical" meaning (LOL). 'text$%' has the sigil '$' and twigil '%'
But really, there is no need for creating the word "twigil", because in the broad usage of sigil, a specific symbol can comprise several other symbols that combine to form the sigil. Therefore, in the above examples, '$', '%', 'and '$%' can all three be considered as sigils in their own right. However, allowing the sigil to be represented by more than a single post-fixed character opens the door to confusion. So some careful thought will have to go into defining exactly what constitutes a "legal" sigil and the terminology used to refer to each symbol in the event of "multiple" sigils.
DrDave
A sigil... ( pl. sigilia or sigils) is a symbol created for a specific magical purpose.
In programming, it is a "magical symbol" (LOL) post-fixed to a word to give it "special" meaning. For example, 'text$'. '$' informs one that the variable 'text$' holds text.
He explained in the doc that a twigil is a second sigil, so that the word now has a SECOND bit of "magical" meaning (LOL). 'text$%' has the sigil '$' and twigil '%'
But really, there is no need for creating the word "twigil", because in the broad usage of sigil, a specific symbol can comprise several other symbols that combine to form the sigil. Therefore, in the above examples, '$', '%', 'and '$%' can all three be considered as sigils in their own right. However, allowing the sigil to be represented by more than a single post-fixed character opens the door to confusion. So some careful thought will have to go into defining exactly what constitutes a "legal" sigil and the terminology used to refer to each symbol in the event of "multiple" sigils.
DrDave
Last edited by DrDave on Mon May 26, 2008 6:19 pm, edited 1 time in total.
...it is better to first strive for clarity and correctness and to make programs efficient only if really needed.
"Getting Started with Erlang" version 5.6.2
"Getting Started with Erlang" version 5.6.2
Hmmm, then from whence came this text on page 2 (link follows quotation):hsmyers wrote:twigil does not appear in the http doc. What are you talking about?
http://www.perl.com/pub/a/2007/12/06/so ... tml?page=2Oddly, there's one spot where we're introducing new punctuation. After your sigil you can add a twigil, or secondary sigil. Just as a sigil tells you the basic structure of an object, a twigil tells you that a particular variable has a weird scope. This is basically an idea stolen from Ruby, which uses sigils to indicate weird scoping. But by hiding our twigils after our sigils, we get the best of both worlds, plus an extensible twigil system for weird scopes we haven't thought of yet.
And it seems cormullion saw it as well:
DrDavecormullion wrote:a good read - a lot of it over my head though (what's a twigil?)
...it is better to first strive for clarity and correctness and to make programs efficient only if really needed.
"Getting Started with Erlang" version 5.6.2
"Getting Started with Erlang" version 5.6.2