4 ms·
Much of the original Bourne shell was written in C that had been macro'd to look like Algol [1]. E.g. /usr/src/cmd/sh/mac.h: #define IF if( #
by gamegoblin 6y ago
Much of the original Bourne shell was written in C that had been macro'd to look like Algol [1].
E.g.
/usr/src/cmd/sh/mac.h:
#define IF if(
#define THEN ){
#define ELSE } else {
#define ELIF } else if (
#define FI ;}
#define BEGIN {
#define END }
#define SWITCH switch(
#define IN ){
#define ENDSW }
#define FOR for(
#define WHILE while(
[1] https://research.swtch.com/shmacro https://research.swtch.com/shmacro
- bondarchuk 6y agoQuite some time ago I saw a piece of C code (probably linked from here) in APL style, I have been trying to find it since, does anyone know what I mean?
- gmfawcett 6y agoMight have been this. The style is usually attributed to Arthur Whitney: https://code.jsoftware.com/wiki/Essays/Incunabulum https://code.jsoftware.com/wiki/Essays/Incunabulum