Scriptometer
retard
re at tard.com.invalid
Thu Nov 4 18:25:36 PDT 2010
Thu, 04 Nov 2010 23:09:47 +0100, Tomek Sowiński wrote:
> Dnia 04-11-2010 o 22:13:12 bearophile <bearophileHUGS at lycos.com>
> napisał(a):
>
>> But I suggest to not overdo it. Minimizing char count doesn't justify
>> writing space-free programs. So I suggest to add spaces and newlines
>> where they belong to increase readability a little.
>>
>>> import std.stdio;
>>> void main(){writeln("Hello World");}
>>
>> import std.stdio;
>> void main() {
>> writeln("Hello World");
>> }
>
> I admit I even wanted to use write, not writeln, to save 2 chars. Hell,
> this is WAR; goal justifies means. :-)
FWIW, the other code on the site didn't seem that unreadable. Cheating is
not fair.
I should also mention that you can change all of these languages quite a
bit with a special library crafted for this purpose. If you want to use D
for bash style scripting, it's very possible to provide a clean set of
shortcut methods and use method "chaining" (e.g. directory.findAllMatching
("foo").filter("bar").copy("floppy drive") )
Since a trivial library would change the results that much, I find this
scriptometer quite pointless..
More information about the Digitalmars-d
mailing list