-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

White space, punctuation, Whitespace and Forth

I wrote about using white space to make code strcture visible

I go some feedback via email oppositing my view fairly strongly because keeping things aligned adds noise to diffs. A fair point. My reply would be that I spend a lot of time looking at code and very little looking at diffs, and I can tell the diff tool to ignore white space differences if necessary. But each to their own.


I also suggested as a thought experiment a language with no punctuation, and my correspondent pointed out Forth as a language that's like that. I didn't know anything about it, but on reading it is indeed just a stream of words. Well, "words" here means something like "tokens" and some of them look like punctuation, but you they're just words.


Then as I read more it suddenly felt very familiar. It's stack-based and you can define new words in terms of the existing ones. I wrote an assembler for Whitespace (a stack-based language) with a macro system that allows me to define new instructions in terms of existing ones. Is this just a superficial similarity? If I learned Forth more fully, would I uncover fundamental differences? There's only one way to find out.


#CodeLayout

#Whitespace

#Forth


back to gemlog

-- Response ended

-- Page fetched on Fri May 3 21:42:52 2024