#9952: make SAGE_CHECK work with SAGE_ATLAS_LIB
-----------------------------+----------------------------------------------
   Reporter:  jhpalmieri     |       Owner:  tbd         
       Type:  defect         |      Status:  needs_review
   Priority:  minor          |   Milestone:  sage-4.6    
  Component:  packages       |    Keywords:              
     Author:  John Palmieri  |    Upstream:  N/A         
   Reviewer:                 |      Merged:              
Work_issues:                 |  
-----------------------------+----------------------------------------------

Comment(by drkirkby):

 Replying to [comment:3 leif]:
 > Hmmm, the latter is much nicer (and works with all shells / {{{test}}}
 programs).
 >
 > Some dead old are only broken in comparing empty strings with {{{=}}} or
 {{{!=}}}; {{{-z}}} and {{{-n}}} always work (otherwise wouldn't make sense
 at all).

 Actually, I'd have to disagree with that. I've been using -z and -n, as I
 agree it looks cleaner, but this is a quote from the autoconf mailing
 list:

 http://lists.gnu.org/archive/html/autoconf/2010-09/msg00030.html

 says


 ''this is yet another case of @var{string} that looks like an operator,
 and yet another reason that you should ALWAYS use test x"$val" = x rather
 than test -z "$val" if you don't know what $val contains.''

 The autoconf developers have a '''huge''' experience in writing code as
 portable as possible, so I'm going to switch to the the more portable
 {{{"x$var" = x}}}. IMHO, for questions of portability, the autoconf
 mailing list is the best place to ask.

 You can argue rightly argue it does not matter with bash, which this shell
 is, but it does matter with some shells. So I would '''personally'''
 choose to use the most portable way, so things I write do not rely on
 bash, but would work with just about any shell. But it's a matter of
 style. Let John choose what he wants. I believe in order of decreasing
 portability, they are:

  * {{{ if [ "x$var" = x ] ; then}}}
  * {{{ if [ -z "$var" ] ; then}}}
  * {{{ if [ "$var" = "" ] ; then}}}

 But all work with modern bash shells. But my '''personal''' preference is
 for the first of these, since it would appear to be the most portable.

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9952#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to