MathExp: KISS or All-Out?

gzp galap at freemail.hu
Fri Oct 16 02:13:59 PDT 2009


language_fan írta:
> Thu, 15 Oct 2009 02:04:09 -0400, Chad J thusly wrote:
> 
>> I'm reminded of how annoying it is when there are different libraries
>> for a language that all define their mathematical types differently and
>> in incompatible ways (all of the Vec2D, Vec3D, etc ever).  Also
>> aggravating is when there is one canonical type that everyone uses, but
>> it is a poor choice (char* in C for strings).
>>
> 
> Sometimes it feels like Vec3 must be the most reimplemented wheel on the 
> world.

Yes, i've also started to implement my own matrix/vector library, though 
could not get too far yet, as I have to learn D meanwhile. I've checked 
some existing ones (ex. Lyla, and some other on dsource - don't remember 
the name, sorry), but my main problem was that,

  - the implementation could not be altered as desired (ex. I need a 
sparse matrix, where the matrix elements grouped using a quad-tree )
  - didn't like the coding style ( ex. "_" in function names). In some 
previous post there was some discussion about this and from my 
experiences even though we found libraries that has all the capability 
we required, we did not used them. Sometimes we didn't used our 
colleagues (good, well-planned) codes either b/c the style differed so 
much (ex capital letters, "_", m prefix for members etc.) So if a 
language can enforce a style (at least giving some warnings - and 
turning on treat warnings as errors :) ), that really helps to reuse 
codes. Well, it's another topic...
  - too general where it is not required for me, but could not extend 
where it is needed for me
  - seemed to be hard to implement a "general" n-d geometry lib based on 
  them(ex 2d/3d/nd ray, sphere, plane, etc, simplicals, space 
partitioning in n-d etc.)

So it'd be really great to create a "new" d mathematical library, that 
is developed and discussed by a group.

Ok, I know there are wrappers for BLAS and other C libraries, but I'd 
like to see a library written entirely in D.





More information about the Digitalmars-d mailing list