reddit discussion on replacing Python in 0install

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Jun 10 21:02:59 PDT 2013


On 6/10/13 6:06 PM, Anthony Goins wrote:
> On Monday, 10 June 2013 at 20:51:16 UTC, Jesse Phillips wrote:
>> On Monday, 10 June 2013 at 18:25:05 UTC, Graham Fawcett wrote:
>>> Hi folks,
>>>
>>> There's an interesting discussion going on at Reddit about choosing a
>>> replacement language for 0install:
>>>
>>> http://www.reddit.com/r/programming/comments/1g1fhf/case_study_for_replacing_python_in_0install/
>>>
>>>
>>> I've tried to do a bit of D advocacy there, but there's more to be
>>> done. :) If you have a few moments to dispel some D myths, and
>>> contribute constructively to the discussion, please take a look!
>>>
>>> Best,
>>> Graham
>>
>> I don't know how to make this test on Windows (current OS). But he
>> uses this to test that failure to print hello correctly indicates
>> failure.
>>
>> ./hello 1< /dev/null; echo Exit status: $?
>>
>> And Rust is the only one to pass in his list (ATS, C#, Go, Haskell,
>> OCaml, Python)
>
> If you want to know what happens on my linux box
>
> 1 module hellotest;
> 2
> 3 import std.stdio;
> 4
> 5 void main()
> 6 {
> 7 writeln("hello world.");
> 8 }
>
> anthony at LinuxGen12:~/projects/temp$ ./hellotest
> hello world.
> anthony at LinuxGen12:~/projects/temp$ ./hellotest 1</dev/null; echo status
> : $?
> status : 0
> anthony at LinuxGen12:~/projects/temp$

The test program is flawed; writeln() writes to stdout, and the 
redirection is to stdin.

writeln throws upon error.


Andrei



More information about the Digitalmars-d mailing list