Name: Stuart Purdie
Member since: 2000-08-31 11:56:11
Last Login: N/A


Not a major developer, certinally, but a writer of small scientific software, arising out of the research I do. I'm currently writing/optimising some Monte Carlo code in Fortran. And lookin for good ways of doing automatic (computer) language translation.

Recent blog entries by Darkman

23 Jan 2001 (updated 25 Jan 2001 at 04:19 UTC) »

Hmm, well, just read the artice on altering C syntax "a thread on the c programming language", by apgarcia. Maybe because I do something different from most (Scientific and numerical analysis rather than systems, windoing or end-user applications), there are a few points I'd like to make.

Arsising from the article, Difference between assignment and comparison: It is impossible to confuse Fortran's = for assignment, and .eq. for comparison testing. That's the big reason why I use the dot notation, even through F90 does allow == for comparison.

Additionally, there are a few related points, not broached in the article.

Missing features A programming language is designed to be run on an particular set of hardware. However, name a language that can acess vector registers well?

This requires the language to have proper semantics for vector operations, otherwise your compiler will have to use some guesswork, making it difficult to predict behaviour. This is not present in C. I think that this is a barrier to using hardware efficently (I cite the PS2 - apparently it's vector registers are vastly underused).

Additionally, if doing something that is inherently vector (or matrix) based, a propert vector syntax makes the whole code a lot more readable, even if running on scaler hardware.

Variable declarations Compare:

  • integer, static, dimension(20) :: variable
  • static int variable[20];

Which is easier to read? I suspect that many would say the latter, due to familarity. I would argure the former (Fortran style). The first thing on the line tells you what type it is, rather buried in the middle. It makes the fact that an array different to a scalar apparent, rather than a modification to the name.

What about:

  • real, pointer :: p
  • float * p;

Darkman certified others as follows:

  • Darkman certified Darkman as Apprentice
  • Darkman certified alan as Master

Others have certified Darkman as follows:

  • jrf certified Darkman as Apprentice
  • welisc certified Darkman as Apprentice
  • Darkman certified Darkman as Apprentice

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

Share this page