Three unlikely successful features of D

Final lecture by Andrei Alexandrescu. Exception handling A simple pattern that can be expressed in many languages. We want to perform an action, a second action and if the second action fails, we need to perform a rollback and in any case, we need a cleanup. This can be done with a try-catch. However, if Read more about Three unlikely successful features of D[…]

Laser panel

Laser finished today with a panel, in which participants can ask the speakers questions. To Erik: Did you predict the collisions of imperical and function styles in C# that you talked about in your first talk? No, coming from functional programming I did not see those problems. I think the way to go is to Read more about Laser panel[…]

The D programming language, part 2

Generic programming We start with a simple example, the min function, that should work for all ordered types. First prototype auto min(L,R)(L lhs, R rhs){ return rhs < lhs ? rhs : lhs; } But! now min(42,”hello”) will generate an error. Andrei adds that using just of type argument is not enough, since float and Read more about The D programming language, part 2[…]

The D programming language

Today Andrei is going to tell us about the D programming language, after his previous talks on C++ earlier this week. The core ideas of D are: Efficient when it can Convinient when it should Safe when it must D is statically typed and uses deduction wherever possible. Safety  Having memory safety means that all Read more about The D programming language[…]

Systems programming in C++, part 2

Continuation of Andrei’s first talk. C++ functions are a good method for abstraction, but there is no purity, safety or exceptions, these are covered by conventions. Example: find an item in an array and do something with it. A nice way to implement this, is with a find and a work function. Searching details are Read more about Systems programming in C++, part 2[…]