Article View: ch.comp.os.linux
Article #22840Re: Pascal - Frontend
From: Stefan Heimers
Date: Mon, 26 Apr 1999 00:00
Date: Mon, 26 Apr 1999 00:00
64 lines
2870 bytes
2870 bytes
Matthias Scherrer wrote:
> Noch was zu C++: IMHO kann diese Sprache ja auch nicht der Weisheit letzter
> Schluss sein. Irgendwo zwischen C und Java, immer noch nicht auf allen
> Gebieten ausgereift (nach wieviel Jahren?) mit immer noch buggy Classen und
> Tools, oftmals nur als C-Compiler (mit besserem type checking) eingesetzt,
> und ein simples "hello world" mit 300-800kb code...
Luegst Du oder weisst Du es nicht besser?
#include<iostream.h>
int main()
{
cout << "hello world";
}
[stefanh@aquarium stefanh]$ g++ hello.C
[stefanh@aquarium stefanh]$ g++ -o hello hello.C
[stefanh@aquarium stefanh]$ ls -l hello
-rwxrwxr-x 1 stefanh stefanh 5173 Apr 26 08:58 hello
[stefanh@aquarium stefanh]$ strip hello
[stefanh@aquarium stefanh]$ ls -l hello
-rwxrwxr-x 1 stefanh stefanh 3360 Apr 26 08:58 hello
3.36kb, nicht 300-800kb! Oder hast Du das Ding statisch gelinkt?
[stefanh@aquarium stefanh]$ g++ -static -o hello hello.C
[stefanh@aquarium stefanh]$ ls -l hello
-rwxrwxr-x 1 stefanh stefanh 729967 Apr 26 09:00 hello
Man kann die Wahrheit mit gemeinen Mitteln immer verdrehen!
#include<stdio.h>
int main()
{
printf("hello world");
}
[stefanh@aquarium stefanh]$ gcc -static -o hello hello.c
[stefanh@aquarium stefanh]$ ls -l hello
-rwxrwxr-x 1 stefanh stefanh 435160 Apr 26 09:04 hello
Auch standard-c bringt statisch noch fast 500kb fuer ein "hello world"
[stefanh@aquarium stefanh]$ gcc -o hello hello.c
[stefanh@aquarium stefanh]$ strip hello
[stefanh@aquarium stefanh]$ ls -l hello
-rwxrwxr-x 1 stefanh stefanh 2696 Apr 26 09:05 hello
und ist dynamisch gelinkt nicht viel kleiner.
Ich bin auch der MEinung, dass standard c effizienter ist, aber man
braucht nicht gleich so zu uebertreiben.
> Ich wuerd dir C empfehlen, wenn du kleinere, schnelle Tools und Utilities
> programmieren moechtest. Falls es OO sein soll, und du dich fuer Internet
> Applikationen (oder Applets) interessierts, ist java wohl das richtige, auch
> weils da viel Literatur dafuer gibt.
Java ist nun wirklich ineffizient! Wie gross wird ein "hello world" in
java?
Stefan
Technical Details
Message-ID:
<372410A9.A14B721A@kosta.ch>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7fvakj$rq0$1@news01.btx.dtag.de> <37235722.4418CB94@gmx.net> <7fvt0u$gfs$1@news06.btx.dtag.de> <3723877a@news.datacomm.ch>Show Full Headers
Complete Article Headers
X-Google-Language: GERMAN,ASCII-7-bit X-Google-Thread: f4b73,b7594c6def59a78b X-Google-Attributes: gidf4b73,public From: Stefan Heimers <stefan.heimers@kosta.ch> Subject: Re: Pascal - Frontend Date: 1999/04/26 Message-ID: <372410A9.A14B721A@kosta.ch> X-Deja-AN: 470941515 Content-Transfer-Encoding: 7bit References: <7fvakj$rq0$1@news01.btx.dtag.de> <37235722.4418CB94@gmx.net> <7fvt0u$gfs$1@news06.btx.dtag.de> <3723877a@news.datacomm.ch> Content-Type: text/plain; charset=us-ascii X-Trace: 26 Apr 1999 09:07:22 +0100, aquarium.ethz.ch Organization: Swiss Federal Institute of Technology (ETHZ) MIME-Version: 1.0 Reply-To: stefan.heimers@kosta.ch Newsgroups: ch.comp.os.linux