http://qs321.pair.com?node_id=187862

It seems that Perl6 will be a more typed language than perl5 in the following sense: if the user provides enough type information to the compiler it will be able to produce more efficient code. Eventually I want to use type traits to be in fine control. But I certainly don't want the complexity. "Modern C++ design" shows that type traits controlled compilation is possible in C++ but that it is an afterthought. What strikes me in this book ( Modern C++ design) is how types can be organized in typelists (chapter 3) so that type traits can be affected to types leading to a lot of control to produce optimized code.

This is done using heavy templating wizardy leading to the automation of a lot of complex decisions at compile-time. But why it has to be so complex?

Probably if such considerations (type traits driven compilation) are taken when designing the language, similar features could be used without the complexity. My understanding of Perl6 is that TWBMMMWTDI (There will be many more way to do it). If the user does not provide enough type information that will mean more work at run-time. If the user provides sufficiently typed variables, a lot of decision will be taken at compile-time. One can imagine that such a program could be mostly compiled to native object code.

My dream is a language that allows me to start with very loosely typed code. Once my program will stabilize, I want to be able to add more typing information to get more performance. Sadly, today perl allows to prototype very fast but if one want better performance, one has to move to another language.

My wish for perl6 as language for the 20 years to come is that it will cover the full gamut from interpreted to compiled.

My only grief against the "Modern C++ design book" is the index that could have been more complete. For exemple, the word trait is missing but you will find you way if you search Typetraits instead. Warning: this book is not casual reading. Working knowledge of C++ templates is a prerequisite.

-- stefp -- check out TeXmacs wiki