On Thu, Jul 9, 2009 at 2:35 PM, William Allen
Simpson<[email protected]> wrote:
> Aryeh Gregor wrote:
>> On Wed, Jul 8, 2009 at 8:56 PM, William Allen
>> Simpson<[email protected]> wrote:
>>> Not sure, as I've been using Unix since late 1977, so my fingers mostly
>>> remember csh. The $ is something like "contents of variable".
>>
>> It's a way to distinguish variables from ordinary text.  Shell
>> scripts, like wikitext, don't require string delimiters, so you can't
>> just make unadorned strings of letters represent variables.
>
> Not in csh. The $ /token/ is an /unary operator/ that means "contents".
>
>
>> Other ad
>> hoc macro languages, like mIRC script, also tend to use some kind of
>> sigil for this reason.  Perl might have come up with the idea of using
>> sigils to distinguish different types of variables, but that's not the
>> only reason they're useful.  According to Wikipedia, BASIC may have
>> used sigils for that purpose before anyone else used them, though:
>> string variables use $, numeric variables don't.  And that's well
>> before Unix, apparently, let alone sh or Perl.
>>
> [[Sigil (computer programming)]] is/are a different concept from what we
> learned in compiler class 30 years ago.  According to the article, sigils
> and twigils are terms that weren't coined until 1999 and later.
>
> And BASIC only "sort of" has sigils; merely all strings end with $.
> Actually, in an early implementation, all strings were a single character
> followed by a $, so the symbol table could be populated with all 26
> possibilities in advance....
>
>
>> Using sigils for wikitext would increase readability and would serve a
>> perfectly useful purpose, while being familiar to many users.  But you
>> couldn't introduce it on old pages, they'd have to opt in somehow.
>>
> Using sigils for wikitext would *DE*crease readability, as any poor soul
> that had to debug Perl can attest.
>
> {{{...}}} works, is easily distinguished from normal text, and BBedit
> does a fine job keeping the braces balanced. I'm sure other editors, too.
>
> Anything else should wait for a general scripting language, as we've been
> talking about in a different thread.  You're not suggesting Perl 6?
>
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>

Maybe it's just me, but I would find $var much easier to read and
understand than {{{var}}}.

-Chad

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to