[vox] things that really suck about C!

Michael Cheselka cheselka at gmail.com
Mon Mar 1 11:26:39 PST 2010


Hello,

Why would a platform independent assembly language not be popular?

Also, C is pretty much gone now, replaced by type-safe C, which is
really C++ abstaining the use of it's features.

15 years ago, a professor pointed out that a C compilar was not for
sale at that point.  One could only buy C++ compilers.

Regards,
Michael Cheselka
650-488-4820




On Mon, Mar 1, 2010 at 10:49, Bill Ward <bill at wards.net> wrote:
> I think you should view C as being nothing more than a platform-independent
> assembly language.  It astonishes me that it is still used as widely as it
> is.
>
> On Sun, Feb 28, 2010 at 6:35 PM, Brian Lavender <brian at brie.com> wrote:
>>
>> I think if anything, C has been a certain detriment to the field of
>> computer science!
>>
>> One calls a function and the arguments are passed by value. Call a
>> function with an array as an argument, and feel free to modify its
>> contents!
>>
>> Certainly, C++ added the idea of reference, but I think Pascal
>> simplifies these concepts much better. Yet, Pascal seems to be relegated
>> to the status as a legacy language!
>>
>> brian
>>
>>
>> #include <stdio.h>
>>
>> #define CAP 10
>>
>> void mod_array(int a[])
>> {
>>  a[2] = 5;
>> }
>>
>> void trychange(int a)
>> {
>>  a = 2;
>> }
>>
>> void reallychange(int *a)
>> {
>>  *a = 2;
>> }
>>
>> int main() {
>>  int b[CAP];
>>  int c;
>>  int i;
>>
>>  printf("Load array and change a value\n");
>>  for (i=0; i < CAP; i++)
>>    b[i] = i + 20;
>>
>>
>>  mod_array(b);
>>
>>  for (i=0; i < CAP; i++)
>>    printf("b[%d] has value of %d\n",i,b[i]);
>>
>>  c = 10;
>>
>>  printf("c has a value of %d\n",c);
>>  trychange(c);
>>
>>  printf("c has a value of %d after trychange(c)\n",c);
>>
>>  reallychange(&c);
>>
>>  printf("c has a value of %d after reallychange(&c)\n",c);
>>
>>
>> }
>>
>> --
>> Brian Lavender
>> http://www.brie.com/brian/
>>
>> "There are two ways of constructing a software design. One way is to
>> make it so simple that there are obviously no deficiencies. And the other
>> way is to make it so complicated that there are no obvious deficiencies."
>>
>> Professor C. A. R. Hoare
>> The 1980 Turing award lecture
>> _______________________________________________
>> vox mailing list
>> vox at lists.lugod.org
>> http://lists.lugod.org/mailman/listinfo/vox
>
>
>
> --
> Check out my LEGO blog at http://www.brickpile.com/
> View my photos at http://flickr.com/photos/billward/
> Follow me at http://twitter.com/williamward
>
> _______________________________________________
> vox mailing list
> vox at lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox
>
>


More information about the vox mailing list