Why I chose D over Ada and Eiffel

John Colvin john.loughran.colvin at gmail.com
Thu Aug 22 10:16:09 PDT 2013


On Thursday, 22 August 2013 at 16:46:46 UTC, H. S. Teoh wrote:
> On Thu, Aug 22, 2013 at 05:50:49PM +0200, John Colvin wrote:
>> On Thursday, 22 August 2013 at 15:42:15 UTC, Ramon wrote:
>> >One (OK, not very creative) example that comes to mind is to 
>> >have
>> >less experienced programmers to work in "safe mode" only, 
>> >which
>> >anyway is good enough for pretty everything the average app 
>> >needs,
>> >and to limit "system mode" to seasoned programmers.
>> 
>> If I was managing a D based team, I would definitely make use 
>> of
>> safe/system for code reviews. Any commit that touches @system 
>> code*
>> would have to go through an extra stage or something to that 
>> effect.
>
> Are you sure about that?
>
> 	import std.stdio;
> 	void main() @safe {
> 		writeln("abc");
> 	}
>
> DMD says:
>
> 	/tmp/test.d(3): Error: safe function 'D main' cannot call 
> system function 'std.stdio.writeln!(string).writeln'
>
> SafeD is a nice concept, I agree, but we have a ways to go 
> before it's
> usable.
>
>
> T

Fair point. Why is that writeln can't be @trusted?


More information about the Digitalmars-d mailing list