Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

From: anonymous <ya6iod1e_AT_lavabit.com>
Date: Wed, 25 Aug 2010 03:20:55 +0400

In C variables can only be created in the start of block ({}
brackets). You sometimes declare new variables anywhere like in C++.

You include files include include files. IMO one external include
file (that is placed into /usr/include) should be enough. And
internal include files can be placed into src/, one .h file for each
c file. Then you can remove #ifdef guards. Read "Notes on
Programming in C"[1], nice tips there. Then user would only need to
#include <nscript.h>

Looks like you are using your 'dynarray' both in library code and as
object type for your language. But user should not know about
structure of these objects. Maybe move dynarray.h into src/ and
replace 'union' with 'void *'? That way your library will be binary
compatible with previous versions even if you add more types or
change/remove existing. I don't want to say that you should care
about binary compatibility, but that means internal things are hidden
better.

[1] http://doc.cat-v.org/bell_labs/pikestyle
Received on Wed Aug 25 2010 - 01:20:55 CEST

This archive was generated by hypermail 2.2.0 : Wed Aug 25 2010 - 01:24:02 CEST