[lug] Re: Bash While Loop Error
SoloCDM
deedsmis at aculink.net
Mon Dec 4 02:17:06 MST 2000
Tkil stated the following:
>
> >>>>> "SCDM" == SoloCDM <deedsmis at aculink.net> writes:
>
> SCDM> BTW, why do so many people put down C and C++?
>
> i didn't mean to be "putting down" c and c++. it's just that you are
> assuming the responsibility for a lot more things when you go down to
> that level. also, some things aren't built-in that are very helpful
> at this sort of text massaging; strings, associative arrays, fairly
> easy handling of i/o, etc.
>
> put another way, after the third or fourth "strcat" or "strcpy", i
> start to get annoyed with the whole thing. i can handle c++ strings a
> little bit, but unless i install a pretty powerful regex engine, and
> optional add-ons to the STL, perl still has more goodies built-in than
> c++ does. c++ can do things that perl can't -- no argument there.
>
> fundamentally, i find it easier to *express* myself in perl; its basic
> constructs are at a high enough level that they map well things in
> this problem space. you don't have to think of a string as a series
> of characters, with this length, allocated on the heap, so remember to
> free it, wait, make sure it's null terminated, blah blah blah. in
> perl, it's just a string. likewise with arrays and lists. they're
> much more natural in perl than in c/c++ (at least to me).
>
> SCDM> Also, what is . . . as you put it -- "scripting" languages? I
> SCDM> understand you were referring to Python and Perl, but exactly
> SCDM> how do Python and Perl rank higher than C and C++?
>
> the semantic difference between "scripting" and "programming"
> languages isn't strict, and there's a lot of disagreement there.
>
> in this case, it sounded like you were gluing other applications
> together, possibly doing some manipulation of the text streams as they
> go from one component to another. this is an ideal use of a very high
> level language, even if the performance isn't totally optimal. (even
> if it takes two weeks to run, would you rather be doing something else
> in that time, or spending two weeks to get a factor of 2 or 3 in speed
> out of a c/c++ program?)
>
> anyway. hope this was coherent; i've been a bit out of it lately with
> a cold. further ponderings on similar topic:
>
> http://slinky.scrye.com/~tkil/perl/what-to-learn.html
>
> finally, i just want to re-iterate that i didn't mean to put down c or
> c++. i just think that the tradeoff (more efficiency vs. much more
> pain in development and debugging) is weighed in favor of a language
> that "does things for you". (note that this is a big part of what
> Java was supposed to provide as an advantage over c++ -- the memory
> management side of things, at least.) i actually rather like c++, but
> i view it as more of a language of last resort.
>
> put another way, developer time is much more expensive than computer
> time. if i can write a script in perl in one day, that takes three
> days of cpu to run, i'm still better off than if it had taken me three
> days to write and one to run. (and if something takes me a day of
> perl, i'll guarantee that you can't do it in three days in c++...).
What spurred this on was an argument on the Python mailing list, when
your words from your former message made me reflect upon the past.
One person was an avid fan of C++ and the other, as you may have
guessed, was completely partial to Python. The argument didn't have
the usual debates about rubbish, but an actual one on one conversation
about the real differences between the two languages.
The most important thing in my thoughts was the background that each
of us come from that makes us who we are and the walls we encounter in
our travels. I'm proud to admit that I came from a Microsoft Windows
environment, *only* for a few reasons -- I learned much about
programming and the appreciation of the stable Linux OS and its
packages.
Now the big "BUT." But, I didn't learn any Perl or Python. It has
produced many educational experiences viewing the uses of it in the
Linux environment that created walls in my paths. The learning curve
isn't the type of walls I'm taking about, but the questionable
necessity to hurdle another obstacle.
I completely understand what you conveyed in your above message. And,
despite the cold you're having, you did an excellent job of explaining
some differences.
The big difference I've learned to be aware of comes from *not* having
to revert to another language to get something done. ANSI C provided
the stability needed to get anything done, even with hardware and the
language executed exactly as it should. Hardware and language
properly executing seems to be the biggest obstacle.
I'm just hoping that Perl (first Perl, possibly) and Python don't
create those same disappointments.
*********************************************************************
Signed,
SoloCDM
More information about the LUG
mailing list