removal of cruft from D
Denis Koroskin
2korden at gmail.com
Mon Nov 23 13:21:41 PST 2009
On Mon, 23 Nov 2009 23:04:54 +0300, Pelle Månsson
<pelle.mansson at gmail.com> wrote:
> dsimcha wrote:
>> == Quote from retard (re at tard.com.invalid)'s article
>>> Mon, 23 Nov 2009 17:14:54 +0000, dsimcha wrote:
>>> [snip]
>>>> as opposed to the
>>>> Java way of having to use 5 different classes just to read in a file
>>>> line by line in the default character encoding.
>>> That's a library issue. Has nothing to do with the language.
>> I agree completely, but for all practical purposes basic parts of the
>> standard
>> library that are used by almost everyone are part of the language.
>> Heck, in many
>> languages (D being one of them) you can't even write a canonical hello
>> world
>> program w/o the standard lib.
> Sure you can!
>
> extern (C) int puts(char *);
> void main() {
> puts("Hello world!\0".dup.ptr);
> }
>
> Pretty!
Even simpler:
extern (C) int printf(const(char)* str, ...);
void main() {
printf("Hello, World!");
}
More information about the Digitalmars-d
mailing list