(I will use "A" here instead of the comment, "" instead of the character.)
Well, I developed APL for a year, I used Aplusdev.org .
You donβt even need anymore. The trick is to try and think about OOP-like . You should have - if I remember well - structured fields used as class data , sth, for example {'attribute1' attribute2, {value, value2}}, so you can easily select them as obj.attribute1 in C ++. (here 'Pick object attribute, use only in classes :) :)
Also use functions with names:
namespace_classname.method(this, arg1) namespace_classname._private_method(this, arg1, arg2)
and many simple tool functions instead of great long lines. The performance degradation is not significant, you can optimize later to say arrays as soon as you see that something can be faster.
And above all: I think that matlab and mathematica are without loops! :) This helps a lot.
My suggestions for reliable, supported code:
use an extended set of utility functions instead of cheating with these unreadable characters so your code is always at the point.
try-catch blocks there is a built-in exception handling that can be used here,
try_begin ();
Tried code, possibly in extra brackets, so as not to forget try_end () at the end.
try_end ();
catch (sth, function_here);
can be well implemented. (You will see that the error trap is very important)
raw type checking : implement the standard and use for functions called so many times ... (you can put a function with flexible parameters right after defining the function) <w> Syntax:
function (point2i, ch): {
typecheck ({{'int, [1 2]},' char}); And to make some statements in typecheck ...
// Your function goes here
}
lambda functions can be very effective, you can do some thought to achieve lambda.
always declares a return indicating "return"!
Testing devices based on the try-catch test of each function you write.
I also used a lot of β apply β and β map β from math, implementing my own version, they are very effective here.
I wrote MATLAB thinking, since here you can have a list of structured fields (= class data) in a variable. You will write a lot of these if you want to keep things without a loop (and you want, believe me). To do this, you need to have a standard naming convention indicating with multiple values:
namespace_class.method (objects, arg1, arg2)
To the end: I also wrote an inputBox and messageBox, like those in Javascript or VisualBasic, they will be very easy to crack simple tools or state checks. The only catch of messageBox is that it cannot pause the stream function, so you need to
AA documentation of f1 f1(): { A do sth msgbox.call("Hi there",{'Ok, {'f2}}); } f2(): { A continue doing stuff }
You can write auto-docs in bash using the gawk / sed combination to put it in a web page. Also creating HTML code helps with printing .;)
I hope it was a good plan for building up properly. Before writing your own tools, try digging out the available tools from an outdated code base ... functions are often even 4 times implemented with different names due to the mess of the time.