Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Frank Heckenbach
Subject: compiling-update
Date: 1 Feb 2005, 19:58:21
Thorsten Glaser wrote:
> CBFalconer dixit:
>
> >>>>>> if gcc dummy.c > /dev/null 2>&1 && [ -r "$A_OUT" ] && [ x"`./"$A_OUT" 2> /dev/null`" = x"" ]; then
> >I thought it might be escaping a quote mark.
Backslash is the escape character. (That's one reason why using it
as the directory separator under Dos is a bad idea -- so its native
shells don't have an escape character and perhaps for this reason
Dos didn't allow characters such as `*' in file names at all.)
> Due to some people still not getting that $(...) is to
> be used over the less portable `...` that can happen ;)
I think you're wrong. According to
http://www.mpi-sb.mpg.de/~uwe/lehre/unixffb/quoting-guide.html:
: Both bash and ksh offer an alternative syntax for backquoted
: commands. Instead of `command` they allow us to write $(command).
[I.e., the original Bourne shell doesn't support $(...).]
That's what I seemed to remember as well, but it took me some time
to find a reference for it (mainly because ` and $() are bad Google
search terms ;-).
So while $(...) can avoid some syntactical problems (mainly if
nested, which isn't the case here, just like the `...` wasn't the
problem at all in this thread), it is actually less, not more,
portable than `...`, AFAICS.
If you have evidence to the contrary, feel free to post it here.
Otherwise it might be time for an apology, as some people might take
"not getting that" as a personal offense ...
> Also an interesting read on the ` character:
> http://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html
While I usually appreciate Markus Kuhn's writings, I think here he's
a little off.
E.g., when he writes. "Some US developers made use of the spacing
grave accent (which they called "backquote") in the syntax of
various command languages. The few instances where this happened
are: [...]", he misses, above all, and probably apart from some
cases not mentioned, its use as a left quote in GNU (and not only
GNU) style messages such as `foobar'. I use this convention myself,
and I don't think I'm a US developer. ;-) And considering that
`...', treating ` as a left ("back") quote, is the only way to get
something like paired quotes at all in plain ASCII, this still seems
a reasonable choice.
BTW, note he doesn't even claim that $(...) was more portable than
`...`. In fact, he speaks about bash (not sh, or Bourne shell in
this context).
In the end, it's simply that the character ` (whatever you call it)
is an ASCII character. Given that ASCII is the base of most
characters sets in use today, and that it's not exactly overly rich
with punctuation characters, I can't agree to abandoning one of
those few that exist because of potential keyboard layout problems.
If there are really problems, they should fix their keyboards by
adding the necessary keys instead.
He mentions a German standard of 1995 which hasn't been widely
implemented so far and I hope never will, which actually plans to
remove two keys, while in the meantime they apparently didn't mind
adding 3 "Windows" keys and (on some keyboards) some 10-20
"multimedia" keys, and let's not mention the num block which
consists of 16 complete duplications. So if there's really shortage
of keys to enter all desired characters with accents, they should
simply add the necessary keys for accents and perhaps, finally, a
compose key (because even with so many dead-accent keys, there are
still some characters you can't enter, such as ø, æ or å; a compose
keys lets you enter these characters and at the same time alleviates
any possible problems they might still have with accents).
BTW, I'm saying "they" because he only writes about Windows and X11
platforms. Me, being a happy text mode user as much as possible, I'm
not affected by those problems.
This is not surprising to me since IME, X11 (and probably all GUIs)
are not exactly best ideals WRT keyboard bindings at all. E.g.,
every xterm (and similar) I've used so far has had problems with
function keys and similar. (Maybe it was only a wrong terminfo
entry, at least in some cases, but since it would be the
responsibility of the authors and packagers, not of me as the user,
to correct it, I consider it broken just as well.) Compared to these
problems, I consider the possible issues with accents and quotes
rather minor.
BTW, in case you're objecting to the fact that characters are used
in a meaning different from their typographic intention in
programming (and other formal) languages, that's nothing special
with that particular character, of course. Even in Pascal we have
things like `..' (standard Pascal), `=>' and `base#number' and `**'
(EP), or `#number' (BP), e.g., even while other languages are much
heavier in this regard.
Frank
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).