CTS logo
hazy blue Catskill Mountains in distance

News:

Online documentation and examples output are now available for our products

PDF::Table v1.005 Released, 29 January 2023
   Please see the CPAN listing, the GitHub entry, and the latest changes list.

PDF::Builder v3.025 Released, 20 January 2023
   Please see the CPAN listing, the GitHub entry, and the latest changes list.


A Thought…

An American lawyer, doctor, and engineer are arrested in France and sentenced to be guillotined. The lawyer is placed in the device first, and the executioner releases the blade. It jams half way down! The lawyer says, “By the laws of your land, you must let me go!” The executioner sighs and says, “Oui, monsieur, get out of here!” Next up is the doctor, and again the blade jams. “By the laws of your land, you must release me!”, and he is let go. Last up is the engineer. Would you believe it? The guillotine’s blade jams again! The engineer twists his head around, studies the mechanism, and announces, “Ah, I see your problem!”

Anon

Useful stuff

Posted on 2021-Mar-21 at 11:41:23 by Phil
Last update on 2022-Jun-20 at 00:28:00 by Phil

Things that would be useful to see in a language.

A common idiom is looping “forever” (well, practically you need to exit that loop at some time).

forever {  ...  }

instead of

while (true) {  ...  }

The idea is that the keyword forever stands out more obviously to the reader, making it clearer what’s going on. In a language like C, you could define a macro forever to be replaced by while (1). Either way, the compiler should be on the lookout for perpetual loops, and check that there is a path out of it (some sort of accessible break; somewhere). Not finding a way out should be a warning, not an error, as there is GUI code which loops forever.

 

All content © copyright 2005 – 2023 by Catskill Technology Services, LLC.
All rights reserved.
Note that Third Party software (whether Open Source or proprietary) on this site remains under the copyright and license of its owners. Catskill Technology Services, LLC does not claim copyright over such software.

 

This page is https://www.catskilltech.com/useful-stuff.html

Search Quotations database.

Last updated Thu, 02 Feb 2023 at 8:33 AM

Valid HTML 5

Wed, 08 Feb 2023 at 5:20 AM EST