Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

D programming incomplete compiler

I'm trying to pick up the D programming language, and I downloaded the compiler from the official site (http://www.digitalmars.com/d/download.html). and I'm following the original D programming tutorials and book. But the compiler doesn't seem to recognize a lot of keywords, for example when I try to use the "immutable" keyword the compiler raises the "Error: undefined identifier immutable" error. And it does this with a lot of other features of D.

How is this possible? It is in fact the official compiler as far as I know.

Thanks in advance,

Marnix van Rijswijk

like image 395
Marnix v. R. Avatar asked Dec 06 '11 16:12

Marnix v. R.


2 Answers

You downloaded the D1 compiler. Get the D2 one.

like image 130
Vladimir Panteleev Avatar answered Oct 02 '22 22:10

Vladimir Panteleev


You're probably trying to use D2 code with D1 compiler.

like image 21
q66 Avatar answered Oct 02 '22 22:10

q66