bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alias problem -- conflict found


From: Eli Schwartz
Subject: Re: alias problem -- conflict found
Date: Tue, 9 Jul 2019 23:39:46 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

On 7/9/19 11:24 PM, L A Walsh wrote:
> On 2019/07/09 06:21, Greg Wooledge wrote:
>> On Mon, Jul 08, 2019 at 03:30:47PM -0700, L A Walsh wrote:
>>   
>>> alias my='declare ' Export='\-x '  Map='-A '   Int='-i '
>>>     
>> Because the dead horse is still equine-shaped, I will beat upon it some
>> more: this is utterly horrible coding and you should stop doing it.
>>   
> ----
>     Why?  What makes clarity "horrible".  If someone didn't know shell's
> way of assigning different attributes to 'declare', vs. most languages
> having
> different keywords or variable notations would be more familiar.

I guess the most obvious reason why your clarity is horrible is due to
the fact that it apparently wasn't a very clear type of clarity. You
confused yourself pretty badly by turning bash into typedef hell, and as
a result, neither you nor anyone else had any remote clue what your code
was doing.

>     I rarely use the forms above, with the exception of 'my', since
> it's alot shorter to type 'my' than its expanded form.  The most common
> ones for me are:
> 
> my, int, array and map.  
> 
>     All of them are shorter than their original forms and are easier
> to type and read.  So what is so horrible about them that it
> should require longer repetitive strings that are not words?

They're easier to type, yes, but they are definitely nowhere near easier
to read. Now in order to know what the code is doing, you not only need
to know bash, you also need to know your own homebrew typedef
specification crudely bolted on.

>     I made a mistake in developing an older program and didn't use
> -u on the front of it.  It did just like you said -- it allowed a program
> with an undefined variable in it to run in cases where it would have given
> the right answer in many or most cases.  However, due to a lack of testing,
> the cases that failed due to that undefined variable were not detected
> by me
> until recently. 
> 
>     The '-u' didn't hide something unimportant -- it hid a symptom of an
> error that remained hidden for years. 

Okay, there's a wild and context-free assertion. I'll just ignore that,
then.

-- 
Eli Schwartz

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]