Weirdest ones I’ve actually tried in order of weirdness.
- APL - If you type a list of random characters, including punctuation, there’s a fair chance it will compile.
- Forth - Everything is in Reverse Polish Notation and programmed in fixed length frames.
- LISP - Some interesting associative programming functions intended for rule based AI (but they are slow)
All of these are pretty old and are from the days when programming languages were in their infancy. APL was even more confusing than using regular expressions, and I didn’t use it for anything actually useful. Forth was better, but the Frame concept (memory was very limited in those days), was very awkward.
If I’m allowed to consider weird CPU architectures, resulting in strange assembler programming, the following are pretty weird, and as a bonus, I’ve actually used these professionally:
- TMS570 HET Assembler - 96 bit instruction Risk CPU specialised for counter/timer operations, which is included with a number of Texas Instrument ARM Core based CPUs. There are no data areas, only instructions. Instructions can self modify themselves by design. Every output has a programmable delay, allowing 10nS timing. Hard to code, but capable of some amazing stuff. Well worth the effort.
- RCA 1802 - 16 general purpose registers, any of which can be the program counter and the stack pointer. This made glueing together code from different sources, which used different PC and SP conventions really challenging. Very much like the Thunks you had with early 16 bit/32 bit Intel '86 programming. I think the idea was to make ISR’s really efficient, but frankly trying to work out which register was the PC and which was the SP from a code fragment, was hard. You could implement multiple SP’s too for added confusion.
I would imagine the transputer would go here too, but I never got to use it.
Slightly off topic, as these are not programming languages, but formal methods.
- Z I successfully used this to prove part of an algorithm. It was a proof by induction. Works well for small contained problems, but gets increasingly unwieldy for large ones.
There are other methods such as B.