× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Clever UNIX/C Constructs
  • From: Jim Langston <jimlangston@xxxxxxxxxxxxxxxx>
  • Date: Wed, 03 Jan 2001 09:37:00 -0800
  • Organization: Pacer International

It's been my observation over the years that all languages are starting
to look like each other.  Each one is beginning to have the same functions
with just a little change in syntax.

Do while (True)
While (True) Do
While (True) {

Select ... Case
Select ... When
Switch ... #:

etc..

I have noticed, however, that C seems to be one of the few languages
that uses the obfuscated +=, -=, ++ and -- and for this I'm glad (Java
realistically just being a subset of C that is run time instead of compiled).

The obvious reason I can think of this is because it's just not a good idea!
It makes code hard to maintain and debug.  In practicality all we are doing is
saving a few characters typing.  There is the fact that functions will only
be called once instead of twice, but this is rather the exception to the rule
rather than the rule itself.

Yes, these functions are useful and they do serve a purpose, but I think that
their purpose is outweighed by the pain the in neck they cause when trying to
maintain them.

If RPG adds these functionalities, I can live with it, and in truth will 
probably
use them myself.  But I can live without them all the same.

Regards,

Jim Langston

Joel Fritz wrote:
> 
> Sorry, I was exaggerating a bit for rhetorical purposes and using the
> standard joke form of substituting the effect for the cause.  After all,
> there _is_ an obfuscated C contest.
> 
> People do try to cram as much stuff as possible into one expression to show
> off.  I doubt that was Kernighan and Richie's intent.
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.