[Info-vax] Fortran

Bill Gunshannon bill.gunshannon at gmail.com
Thu Dec 6 20:34:35 EST 2018


On 12/6/18 8:26 PM, Arne Vajhøj wrote:
> On 12/6/2018 8:14 PM, Bill Gunshannon wrote:
>> On 12/6/18 8:05 PM, Arne Vajhøj wrote:
>>> On 12/6/2018 8:58 AM, Bill Gunshannon wrote:
>>>> On 12/5/18 10:07 PM, Arne Vajhøj wrote:
>>>>> On 12/5/2018 9:12 PM, Dave Froble wrote:
>>>>>> On 12/5/2018 9:00 PM, Arne Vajhøj wrote:
>>>>>>> On 12/5/2018 8:23 PM, Bill Gunshannon wrote:
>>>>>>>> On 12/5/18 1:29 PM, Scott Dorsey wrote:
>>>>>>>>> Didn't Knuth say that global variables should be banned?
>>>>>>>>
>>>>>>>> And Dijkstra said GOTO's should, too.  How did that work out?
>>>>>>>
>>>>>>> Pretty well.
>>>>>>>
>>>>>>> Many newer languages does not have GOTO.
>>>>>>>
>>>>>>> And in those newer languages that does have it, then
>>>>>>> its usage is typical extremely rare.
>>>>>>
>>>>>> We must exist in different worlds ...
>>>>>
>>>>> You see a lot of code in languages like C# and PHP use GOTO??
>>>>
>>>> I have never seen any code in PHP that wasn't totally
>>>> obfuscated and confusing even without GOTOs.
>>>
>>> A lot of PHP code is very similar to C just with all
>>> types removed and all variable names prefixed with $.
>>>
>>> :-)
>>>
>>
>> In my 40 years of doing C I have never seen C as bad as
>> most of the PHP I have seen outside of the Obfuscated
>> C Contest.  And even much of that was more understandable.
>>
>> I have seen PHP that was so confusing that after being away
>> from it for three years the original author couldn't figure
>> it out, or fix it.
> 
> Weird.
> 
> PHP is a rather simple language.
> 
> Usually very straight forward to see what it does. At least
> if one has seen a "C family" language before.
> 
> There are a lot of bad PHP code violating all sorts of
> best practices for design. But it is still readable.
> 
> A piece of trivial PHP code:
> 
> <?php
> function fac($n) {
>      if($n <= 1) {
>          return 1;
>      } else {
>          return $n * fac($n - 1);
>      }
> }
> 
> for($i = 0; $i <= 10; $i++) {
>      echo sprintf("fac(%d) = %d\r\n", $i, fac($i));
> }
> ?>
> 
> Most programmers should find that very simple.

And, as a trivial piece of code, it really does nothing.
That's easy to understand.  But, as soon as it gets complex
enough to do anything the fun begins.

bill




More information about the Info-vax mailing list