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

Re: Ethernet trouble



On Thu, Jan 30, 2020 at 11:58:47AM -0700, ghe wrote:
> Well, I don't in any way consider myself a hardware guy, but in Java,
> Pascal, C, PERL, Python, FORTRAN, BashScripts, etc, '+' usually does the
> same thing every time I type it.

In bash, += can be used to append to a string variable, to increment a
pseudo-integer variable, or to append new elements to an array.

If you restrict yourself to a raw + sign, it can be a simple string
constant that you're printing, or it can be part of an integer
addition expression, or it can be the special sentinel of a find -exec
command which terminates the -exec and requests xargs(1)-like behavior
(aggregation of many arguments into a single call).

The use of the same syntactic element with different meanings depending
on context is called "overloading".  In some programming languages,
like C++, this is considered a "feature".  You mentioned Java, which
probably does a bit of it as well.  I don't really know Java, thank gods.

For the rest of us, who didn't drink the OO kool-aid, overloading is
just a nightmare.

What this has to do with hardware, I have no idea.


Reply to: