🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.objects
Article #4654

Re: Prawda o C++

#4654
From: Andrzej Lewandowski
Date: Sat, 23 Jan 1999 03:15
74 lines
4010 bytes
"Adam Karpierz" <karpierz@itl.pl> wrote:


>Niestety gdy pojawily sie PC-ty bylem kiedys postawiony
>przed sytuacja _koniecznosci_ przepisania na C sporej czesci swojej
>biblioteki w Algolu gdzie jak Pan zapewne doskonale pamieta deklaracja
>tej tablicy bylaby chyba najnormalniejsza jaka sobie mozna awyobrazic

>BEGIN
>REAL ARRAY tab[-N : N];

>% w ogolnym przypadku typ ARRAY nazwa[wyrp1:wyrk1, wyrp2:wyrk2,...];
>...
>END;

>i naprawde stosowalem z powodzeniem powyzszy sposob w C
>no bo inaczej pozostalo by mi mozolne przeliczanie indeksow z Algolu
>tak aby kazda tablica byla indeksowana od 0.
>Prosze mi powiedziec po co ? Aby sie dostosowac do ograniczen C
>w tym wzgledzie i uczynic wcale dobry kod zupelnie nieczytelnym i
>nielogicznym ?. Wolalem to drugie wyjscie czyli dostosowac C

Wiem. Robilem to samo. Ale 

>
>>doubler array_ [2+N + 1];
>>double * array = &array[-N];
>

Wyglada ohydnie. Coz, C... Kto to powiedzial?... Bodajze niejaki
Gabriel, w artykule "Worse is Better": "UNIX and C are ultimate
computer viruses". Oto fragment:

"...
Now I want to argue that worse-is-better is better. C~is a programming
language designed for writing Unix, and it was designed using the New
Jersey approach. C~is therefore a language for which it is easy to
write a decent compiler, and it requires the programmer to write text
that is easy for the compiler to interpret. Some have called~C a fancy
assembly language. Both early Unix and C compilers had simple
structures, are easy to port, require few machine resources to run,
and provide about 50\%--80\% of what you want from an operating system
and programming language.

Half the computers that exist at any point are worse than median
(smaller or slower). Unix and C work fine on them. The
worse-is-better philosophy means that implementation simplicity has
highest priority, which means Unix and~C are easy to port on such
machines. Therefore, one expects that if the 50\% functionality Unix
and~C support is satisfactory, they will start to appear everywhere.
And they have, haven't they?

Unix and~C are the ultimate computer viruses.

A further benefit of the worse-is-better philosophy is that the
programmer is conditioned to sacrifice some safety, convenience, and
hassle to get good performance and modest resource use. Programs
written using the New Jersey approach will work well both in small
machines and large ones, and the code will be portable because it is
written on top of a virus..." 

Zachecam do przeczytania calosci pod

http://www.med.virginia.edu/~sdm7g/LangCrit/gabriel/

Jak rowniez

http://www.med.virginia.edu/~sdm7g/LangCrit/

A.L.

P.S. Richard Gabriel jest rownie slynny jak K&R i Sztostrup, a moze i
bardziej. Byl kluczowa postacia w stworzeniu nowoczesnej wersji jezyka
LISP, jego standardu i przenyslowej implemenatcji.
Technical Details
Message-ID: <36a93ecd@news3.ibm.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!uw.edu.pl!newsgate.cistron.nl!het.net!diablo.theplanet.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!165.87.194.242!newsm2.ibm.net!ibm.net!news3.ibm.net!32.100.223.28
References: <36A623E1.A4AF7B72@zeus.polsl.gliwice.pl> <36a6d8c3.0@news.vogel.pl> <36a7cf5f@news3.ibm.net> <788lpj$k6e$1@zeus.polsl.gliwice.pl> <36a90b54@news3.ibm.net> <36a930c3.0@news.vogel.pl>

Show Full Headers
Complete Article Headers
From: lewando@ibm.net (Andrzej Lewandowski)
Newsgroups: pl.comp.lang.c,pl.comp.objects
Subject: Re: Prawda o C++
Date: Sat, 23 Jan 1999 03:15:14 GMT
Reply-To: lewando@ibm.net
References: <36A623E1.A4AF7B72@zeus.polsl.gliwice.pl> <36a6d8c3.0@news.vogel.pl> <36a7cf5f@news3.ibm.net> <788lpj$k6e$1@zeus.polsl.gliwice.pl> <36a90b54@news3.ibm.net> <36a930c3.0@news.vogel.pl>
X-Newsreader: Forte Free Agent 1.0.82
NNTP-Posting-Host: 32.100.223.28
Message-ID: <36a93ecd@news3.ibm.net>
X-Trace: 23 Jan 1999 03:15:25 GMT, 32.100.223.28
Organization: IBM.NET
Lines: 79
X-Notice: Items posted that violate the IBM.NET Acceptable Use Policy
X-Notice: should be reported to postmaster@ibm.net
X-Complaints-To: postmaster@ibm.net
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!uw.edu.pl!newsgate.cistron.nl!het.net!diablo.theplanet.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!165.87.194.242!newsm2.ibm.net!ibm.net!news3.ibm.net!32.100.223.28
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit