Re: Last Ninja Programming Language



On Fri, 12 May 2006 20:39:12 -0700, Doctor wrote:

* Two character limit of variable names

So when 88 unique variables just aren't enough (not including arrays).

It's not the number of variables, it's the heavy constraint on the names
itself. You can't use very expressive names if they are limited to two
characters. Programs tend to be much more understandable if the
variables names tell what their values represent. Two character
abbrevations become ambigious very quickly in any non-trivial program.
Especially if they are all global.

* No support for structured programming (procedures, while loops, etc)

If then structures are supported, and as I said you can get wedges to
go more complex.

But ``IF``/``THEN`` has to fit into one BASIC line. That's quite
limited.

* Consequently no local variables, only global

Can be emulated by storing variable assignments directly into memory
using pokes, while keeping global variables in the regular structure of
BASIC.

Poking locals into memory helps even more to write unreadable programs
than just two character variable names. And to allow locals for recursive
calls you start adding a "stack pointer" to the PEEKs and POKEs, right?

* No complex data types

Depends on what you define as complex.

Anything that's not a basic type i.e. string, floating point number,
integer or an array of any of the three basic types.

* Fscking line numbers

True, there aren't any proceedural calls to be had, but it does work.

Mandatory line numbers and procedural calls are different issues. Even
without procedural calls programs would be more readable if you just put
labels in front of parts that can be jumped to instead of line numbers
everywhere. ``GOSUB MoveEnemy`` is much clearer than ``GOSUB 2770`` and
it's easier to reuse subroutines in other programs without the need to
renumber parts if the line numbers conflict.

I remember a program that had a BASIC editor without line numbers where
one can write "nice" source code with many newlines, proper indention and
labels that "compiled" such a program into compact BASIC V2. Just can't
remember the name…

Ciao,
Marc 'BlackJack' Rintsch
.



Relevant Pages

  • Re: Access one character in an array of characters
    ... > points but also display the cards of a particulier hand by suit. ... > To print out the values by rank I have used this while loop sequence: ... > the loop works it would display any character that is not the null ... raw arrays is not the 'OO way'. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: structure toupperlower?
    ... >> How can I use a for loop on a struct? ... > of which contains offset and size information for the struct members ... > The toupperand tolowerfunctions apply to a single character: ... > If you have a struct some of whose members are character arrays ...
    (comp.lang.c)
  • Re: What are SZ array?
    ... explanation of a much different meaning of the term. ... one-dimensional arrays of bytes, with each byte containing a character (or ... say of such a string that it was 'null-terminated'. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: More efficient alternatives to (subseq) for accessing parts of a string array?
    ... CHARACTER are not one-byte, usually, in today implementations. ... Displaced arrays are like pointers inside arrays. ...
    (comp.lang.lisp)
  • Re: placing labels atop single-column arrays
    ... vertically, all enclosed by brackets. ... Now I need to label these arrays: for example, ... Using the AMS align environments doesn't seem to help. ... the labels to horisontally line up. ...
    (comp.text.tex)