On Sunday, 12 August 2012 at 02:28:44 UTC, Andrei Alexandrescu wrote:
On 8/11/12 7:33 PM, Walter Bright wrote:
[snip]

Allow me to insert an opinion here. This post illustrates quite well how opinionated our community is (for better or worse).

The OP has asked a topical question in a matter that is interesting and also may influence the impact of the language to the larger community. Before long the thread has evolved into the familiar pattern of a debate over a minor issue on which reasonable people may disagree and that's unlikely to change. We should instead do our best to give a balanced high-level view of what D offers for econometrics.

To the OP - here are a few aspects that may deserve interest:

* Modeling power - from what I understand econometrics is modeling-heavy, which is more difficult to address in languages such as Fortran, C, C++, Java, Python, or the likes of Matlab.

* Efficiency - D generates native code for floating point operations and has control over data layout and allocation. Speed of generated code is dependent on the compiler, and the reference compiler (dmd) does a poorer job at it than the gnu-based compiler (gdc) compiler.

* Convenience - D is designed to "do what you mean" wherever possible and simplify common programming tasks, numeric or not. That makes the language comfortable to use even by a non-specialist, in particular in conjunction with appropriate libraries.

A few minuses I can think of:

- Maturity and availability of numeric and econometrics library is an obvious issue. There are some libraries (e.g. https://github.com/kyllingstad/scid/wiki) maintained and extended through volunteer effort.

- The language's superior modeling power and level of control comes at an increase in complexity compared to languages such as e.g. Python. So the statistician would need a larger upfront investment in order to reap the associated benefits.


Andrei

Andrei,

Thanks for bringing this back to the original topic and for your thoughts.

Indeed, a lot of econometricians are using MATLAB, R, Guass, Ox and the like. But there are a number of econometricians who need the raw power of a natively compiled language (especially financial econometricians whose data are huge) who typically program in either Fortran or C/C++. It is really this group that I am trying to reach. I think D has a lot to offer this group in terms of programmer productivity and reliability of code. I think this applies to statisticians as well, as I see a lot of them in this latter group too.

I also want to reach the MATLABers because I think they can get a lot more modeling power (I like how you put that) without too much more difficulty (see Ox - nearly as complicated as C++ but without the power). Many MATLAB and R programmers end up recoding a good part of their algorithms in C++ and calling that code from the interpreted language. I have always found this kind of mixed language programming to be messy, time consuming, and error prone. Special tools are cropping up to handle this (see Rcpp). This just proves to me the usefulness of a productive AND powerful language like D for econometricians!

I am sensitive to the drawbacks you mention (especially lack of numeric libraries). I am so sick of wasting my time in C++ though that I have almost decided to just start writing my own econometric library in D. Earlier in this thread there was a discussion of extended precision in D and I mentioned the need to recode things like BLAS and LAPACK in D. Templates in D seem perfect for this problem. As an expert in template meta-programming what are your thoughts? How is this different than what is being done in SciD? It seems they are mostly concerned about wrapping the old CBLAS and CLAPACK libraries.

Again, thanks for your thoughts and your TDPL book. Probably the best programming book I've ever read!

TJB

Reply via email to