|
I finally made my mind several days ago, and bought MS Visual C++ .NET book. I couldn’t be more happy that day! Unfortunately, what I was able to experience, shocked my being…. My friends, I came to an exciting yet terrible conclusion: Pascal is the best scripting language.
I know that some of you will take this as bitch-slap in the face (as I did), but stats prove it right.
I’ll present a simple program which calculates how many throws you took to get critical hit (19,20) or critical miss (1) in three scripting languages: Pascal, PHP and MS Visual C++ .NET.
Pascal: view code
PHP: view code
C++.NET: view code
Now, out of this, you would say “Well, PHP’s code is the shortest one, isn’t it?” - which is correct, but let’s get a bit deeper into the stats:
To run PHP script you must:
- have web-server installed (Apache, IIS, PWS, …)
- have PHP support installed for that web-server (usually: configuration of lots of files)
… which, usually, you don’t ….
BUT when you have those, you don’t have to compile the file - it’s all done (functionality in less than 1kb)
Ok, now let’s say that MS Visual C++ .NET’s code is the most complex one, but there’s a hidden catch, and it must be the best scripting language (for crying out loud, it’s C++!). I compiled it and got 170kb EXE file which runs in command prompt. Okay. I distributed it to several persons having different versions of Windows (98, XP pro, Me) - and all of them got different kind of error.
Neat.
Now I got pissed and compiled Pascal variant. I got 3kb EXE file which runs in command prompt, on all OS’es from MS Dos to Windows XP.
What do you think of that?
If you don’t believe me, here are the examples:
Download Pascal Variant;
Download MS Visual C++ .NET Variant; (zipped to 66kb)
Run PHP variant (if you want to run it on your own server, copy-paste the code shown above)
And so. If you get the MS Visual C++ .NET variant running, please leave a comment to enlighten me. Also, take a note if you have “.NET framework” installed or not.
What to say except ‘Pascal owns ye all’ …. but still I like PHP the most
|