May 14, 2004
Ben Hinkle wrote:

> Norbert Nemec wrote:
> 
>> Good work. I just hope you don't expect to bring this to production quality. It is a great case study demonstrating some details, but I would not want to use that in production code. :-)
> 
> The 2D matrices are fast enough to be useful, I think. I haven't done any
> profiling of the nd stuff so I have no idea how much could be inlined but
> it all uses structs and direct calls so theoretically it should be fast.
> Of course building in nd-arrays would most likely give the fastest code
> and best error messages, etc.
> 
>> Especially the stepwise indexing/slicing: it is nice to see that this is possible, but if this kind of coding should make it into a standard library, we would be better of sticking with good old C++...
> 
> Hmm. and I went and added comments and everything :-)
> I guess code is always simpler when you write it.

Well, I guess, I judged by first impression. I did not really dig into all the details, but I'm pretty sure, the module is still small enough to understand it all. Anyway: you probably have to confess, that many of the design decision were not guided by what you would have liked to do, but more by what the language allows you to do. Especially, the stepwise unpacking is one example for that. In C++, one could have done without it and gotten more functionality with a cleaner syntax and less effort.

This is what I meant: code like that - working more "against" than "within" the language - may be a interesting case study and may even be usable so some extent, but my vision of a computer language with powerful arrays looks somewhat different...

> I want Fortran-aligned for 2 reasons: Fortran and MATLAB. For numerical stuff I prefer interoperating with those two over C compatibility. I suppose since I work for the makers of MATLAB I have a bias but I've been trying to keep that in check.

OK, I might actually have to consider that. Up to now, I just assumed that D should have C-style arrays as default. Now, actually, I'm not really sure about that any more...
1 2
Next ›   Last »