Walter:

> I'm afraid that's baloney, as I pointed out in the other thread.

What you have said was about application code. It's not true for kernel code, 
where you need strict control on what, how, and if the compiler performs 
certain optimizations.


> I think that is a serious misinterpretation of the complaint. The complaint 
> was 
> actually that the high level abstractions that one can choose to use in C++ 
> can 
> be impenetrable in what they do. In D, if you want low level control, write 
> low 
> level code. It's that simple.

This is true for C++ too. But he doesn't want high level abstractions in kernel 
code. So he has not much use for C++ and D too. But he wants more static 
analysis.


> Typed assembler is a waste of effort in a language like D, as you only need a 
> few drops of assembler here and there.

This talk says:
http://www.linuxjournal.com/article/7272
>The problem is that being the kernel has to do a lot of things that break 
>typechecking. Which you see more in the kernel than in a lot of other 
>programs. You end up having a lot of inline assembly which is obviously 
>completely opaque.<

In the Nucleus of the experimental operating system Verve I have seen a good 
amount of assembly code. They are able to use so much assembly because it's not 
normal assembly, it's typed its assertions are often verified statically. So 
it's not completely opaque.

In the D runtime I have counted 2100 lines of asm just for the array operations 
implementation, (that's unfinished still). asm code is uncommon in application 
programs, but it's clearly more than few drops.


> Those languages are failures at what they propose to do; they need years and 
> perhaps decades to fulfill that.

C#4 has contracts too, as a library:
http://research.microsoft.com/en-us/projects/contracts/

But this page says something interesting:
http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx

>Code Contracts Premium Edition: This version installs only if you have one of 
>the following: Visual Studio 2008 Team System, Visual Studio 2010 Premium 
>Edition, or Visual Studio 2010 Ultimate Edition. It includes the static 
>checker in addition to all of the features in the Code Contracts Standard 
>Edition.<

It means that if today you have better versions of Visual Studio, then you have 
a static checker for contracts. I have not used them yet, I will try to try 
them. As you see Microsoft is pushing some of its research in the Real World 
today.

And regardless the usefulness of Verve today, they contain some quite 
interesting ideas. I'm not just an engineer, I like ideas too. Shutting the 
brain closed is stupid.

Bye,
bearophile

Reply via email to