Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: OneWingedShark
> Hm, as an old-hand at C I’m sure you’ve got a lot to say on the various shortcomings/pitfalls therein.

Shortcomings and pitfalls of C? Those have been listed and recited and documented and argued for 30+ years. I needn't repeat them yet again.

I prefer simple tools that do exactly what I want, to complex tools that make selected tasks trivial and other tasks impossible. I prefer driving a manual transmission car, for example.

C is still the language of choice for much of the non-application programs written today. System stuff, drivers, utilities, embedded devices, controllers, etc. You know, the stuff that actually DOES something beyond painting pretty pictures on a user's screen. :)

The two main reasons (IMO) that anybody uses anything else are:

  1. In the hands of a less-than-skilled programmer, C will happily do what they tell it to do, which is most often erroneous. It's not for the lazy or inept. There are much safer languages, Nanny-May-I style, for those programmers.

  2. String and database processing in C can be very tiring and frustrating, and a lot of business software processes strings and databases. There are special-purpose languages that excel at those tasks.

72 posted on 09/21/2010 7:30:38 PM PDT by dayglored (Listen, strange women lying in ponds distributing swords is no basis for a system of government!)
[ Post Reply | Private Reply | To 71 | View Replies ]


To: dayglored

> The two main reasons (IMO) that anybody uses anything else are:
> 1. In the hands of a less-than-skilled programmer, C will happily do what they tell it to do, which is most often erroneous. It’s not for the lazy or inept.

That’s odd; IMO the C/Linux mentality encourages laziness — In my personal experience I’ve often come across the response “why don’t you download the/a unix/linux source” when my peers [I’m a CS major; one final class left] hear that I’d like to make an OS.

There’s also the “an example online,” cut-and-paste, and then tailor it to your program’s needs crowd; but I’m hesitant to link that with the C/Unix mindset as it seems to be more language agnostic & it’s also possible that the shift in a lot of the curriculum to Java influenced/germinated that a bit more than C.

> There are much safer languages, Nanny-May-I style, for those programmers.

Ah, like Ada.
I actually REALLY like the amount of things (checks & optimizations) Ada compilers can do at COMPILE-TIME; some of which is quite impressive.

> 2. String and database processing in C can be very tiring and frustrating, and a lot of business software processes strings and databases. There are special-purpose languages that excel at those tasks.

Strings and databases processing can be tiring/frustrating w/o C; I think that those two areas are inherently more... picky/difficult.
For strings, some of it is the native language [English in our case] where the different forms and exceptions all have to be handled: pluralities is a perfectly good example. Goose —> Geese; but Moose -/-> Meese. Mouse —> Mice; but House -/-> Hise. Matrix —> Matrices; does Dominatrix —> Dominatrices?

Databases are similar in that the storage-forms in the database might not be the best forms for the types of manipulations you intend to do.... and the multiple valid formats for the same data-fields might be structurally different (yet presenting the same information); consider street addresses, especially international ones.

>C is still the language of choice for much of the non-application programs written today. System stuff, drivers, utilities, embedded devices, controllers, etc. You know, the stuff that actually DOES something beyond painting pretty pictures on a user’s screen. :)

Honestly I think that Ada would be a better choice for embedded/system stuff; its development *was* first commissioned by the DOD specifically for handling the unique/”non-standard” hardware of the various weapon-systems, like missile-launch control — and especially considering that the spec/implementation separation is much more ‘definite’ than C; I mean how many times have you had to work around header-files exposing some implementation detail in C?


73 posted on 09/21/2010 8:20:35 PM PDT by OneWingedShark (Q: Why am I here? A: To do Justly, to love mercy, and to walk humbly with my God.)
[ Post Reply | Private Reply | To 72 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson