This is the reason in PETSc : Why is PETSc programmed in C, instead of Fortran or C++?C enables us to build data structures for storing sparse matrices, solver information, etc. in ways that Fortran simply does not allow. ANSI C is a complete standard that all modern C compilers support. The language is identical on all machines. C++ is still evolving and compilers on different machines are not identical. Using C function pointers to provide data encapsulation and polymorphism allows us to get many of the advantages of C++ without using such a large and more complicated language. It would be natural and reasonable to have coded PETSc in C++; we opted to use C instead.
On Fri, Apr 6, 2012 at 2:06 AM, John Chludzinski <[email protected] > wrote: > GSL is written in C. > > To avoid the no-value-added complexities of C++, try using/learning Python. > > > 2012/4/6 Omar Andrés Zapata Mesa <[email protected]> > > > Hi Alexander. > > I think is better idea learn c++ because you can use several code that > > implement Gnu Scientific Library like http://root.cern.ch written in C++ > > and many others. > > If you learn c++ is very easy understand C code but not the other way. > > > > Regards > > > > On Thu, Apr 5, 2012 at 11:25 PM, John Chludzinski < > > [email protected]> wrote: > > > >> If you want to get to work ASAP - learn C. If you want to invest lots of > >> time up front before you begin using GSL, go for C++. > >> > >> I know both but prefer using simple C (actually, --std=C99) when writing > >> numerical code. > >> > >> ---John > >> > >> On Thu, Apr 5, 2012 at 7:58 PM, Alexander Gallego <[email protected] > >> >wrote: > >> > >> > Hi, > >> > I need to implement the GSL but I'm not sure if I should better learn > C > >> or > >> > C++ in order to make a correct and fast use of the library. > >> > Which language do you recommend? > >> > > >> > Thanks too much. > >> > > >> > -- > >> > Alexander Gallego C. > >> > Instituto de Física, Facultad de Ciencias Exactas Y Naturales. > >> > Universidad de Antioquia. > >> > > >> > > > > > > > > -- > > Omar Andres Zapata Mesa > > Fundamental Interaction Phenomenology Gruop (Gfif) > > Head Developer > > http://gfif.udea.edu.co > > Gfif Developers (Gfif Dev) > > Division of computer science > > System Engineering Student > > Universidad de Antioquia At Medellin - Colombia > > Usuario Linux #490962 > > > > > -- Abraham Zamudio Ch.
