A curious proposal

For friendly off topic discussion not covered in a forum above.
Forum rules
No politics, please.
User avatar
spiroyster
Donor
Donor
Posts: 145
Joined: Thu May 03, 2012 8:24 am
Location: Somerset, UK

Re: A curious proposal

Unread postby spiroyster » Mon Oct 09, 2017 3:20 am

Oskar45 wrote:
spiroyster wrote:
Does APL2 use the same glyphs as the rest of the world? Or is it still that mystical runic symbolism which invokes loki every time you attempt to write a program in it o.0


[Sorry for replying so late - was abroad for some time]

Yes, APL still uses these characters - with good reasons (see Iverson, "A Programming Language", Wiley 1962). But it doesn't seem to be widely known that there were also versions using just keywords, available even on the PC, and at least one dialect utilizing only ASCII characters.*)

Of course, there is no such thing as *the* ideal programming language and there will never be (see Reynolds, "Theories of Programming Languages", Cambridge 1998). Like all others, APL has a lot of problems by itself.

But, IHMO, the difficulties people have with APL has nothing to do with the characters [most of them are normal mathematical symbols, and the rest can be learned in an hour - compare that to the number of key-combinations you need to master to get fluent in vi or emacs]. No, the problem is that most are not used to think in terms of *arrays* (see More, "Notes on the diagrams, logic and operations of array theory", Tapir 1981). E.g., suppose A is a 23-dimensional numerical structure, and you want to get just the sum of the elements. In APL, I would write +/,A. What would you do?

*) Actually, Mathematica is influenced strongly by APL. In fact, the "Mathematica 2"-book had a table corresponding APL symbols to Mathematica functions.

Ah yes, tou ché! no doubt there is many a snippet duel which does not favour c++'s arsenal :(. I favour explicit over implicit, so I know exactly what it is I am dealing with, yes I have problems in real life, like when the weather man says 'It's going to be relatively cold today, with a small chance of rain'...which day are we using a reference here, what is the probablilty of this percipitation, why are you using that projection for the map, why is greenland that big? mind == blown ... and thats just the morning...speaking of which, In your example, you need somewhere to put the result? ;) but yes, for completeness, here is the poor example of a counter...

Assuming A is a dynamic container:

Code: Select all

std::for_each( A.begin(), A.end(), [&result](var a){ result += a; });

Assuming A is not a dynamic container:

Code: Select all

for ( int a = 0; a < 23; ++a ) { result += A[a]; }


Certainly these two examples show the direction c++ has gone in the past number of decades. Less operator usage, more '<', '>', lambda's and ever increasing length of names for stuff, obsessions with explicit, rather than implied usage of things and 1440p screens maybe?

This does raise a very good point, which before I militantly suggested C/C++, you were perhaps alluding to...(given the title of this thread)

The language is merely the quill, and the way we write it down, but also a governing factor. The way the problem is approached, and the subsequent solution is perhaps far more important, and is somewhat dictated by the choice of language (no doubt people first approach a problem knowing what tools they have to solve it, and part of the initial iteration of the solution is biased towards this). Of course tools are only as good as the user, and a good tool would allow the user to be flexable and not restrict them from fullfilling their task the way they want to. Syntactical elegance, while nice, may not be high on the priority.

Unfortunately, in the real world ime, the choice of the language is dictated by the interface of the 'thing' you are attempting to interface with, many scenarios I have come across in which another language, im(personal)o, would have been better choice given the data/structures/constructs... like if Apple didn't force Obj-C, would anyone actually choose to use it over java or C# for example? I'm pretty sure it was something like #20 one year, iPhone comes out, then it’s like #4 the next year...and I doubt that’s because of all the new amazing features it introduced that year (in fact it was probably still in the re-animation phase, I wonder how many new developers that year questioned why the 'NS' prefix was used :roll:).

If its theory of algorithms, then yes something more akin to APL perhaps would introduce the reader to concepts involved with procedural algorithms.... maybe something like MatLab would also be beneficial. Personally, I have always been a visual person and so anything which can 'draw-me-a-diagram' would help. Something like the Valiant Roamer? or LOGO? Then in semester 2 they could progress to MatLab or a VPL? Finally they would be doing C and assembly! And brainfuck for funzzies….(actually given the minimal number of chars supported by brainfuck…It could be argued that’s a good thing to start with :lol: o.0).

And then there's concurrency, which should be starting to become funcdamental in programming teaching :twisted: ... picking something like Fortran and using coarrays, is a very different paradigm to using something like worker threads and having to do a lot of contention yourself.

As they progress, the tools available to them will become less hand-holding, less visual, but more flexible allowing them to perhaps investigate
alternative procedures to achieve what they want within the same domain.

For me, like many others, it was BASIC ... And I turned out alreet… relatively speaking.


Return to “Everything Else”

Who is online

Users browsing this forum: No registered users and 3 guests