Live data from Hacker News

What can be learned from studying long gone development practices?

shape-of-code.coding-guidelines.com

141–142 of 142 posts

Re: What can be learned from studying long gone development practices?

#141

Earlier quoted context omitted.

> One particularly confusing technique was to goto a computed expression. Leads to all sorts of interesting bugs. Huh. I suppose the modern-day equivalent is commonly done with higher-order functions - in particular, callbacks, CPS and returning functions. I've worked with people who find this confusing (particularly the last one - functions returning functions).

I believe that this confusion comes from the avoidance of low level details. A function is just a location in memory where instructions are stored. Returning a function is nothing else as returning a pointer to a memory location. In languages like Java that want to hide everything memory related I also was struggling with grasping what a function really is. Is it even allowed to return a function? Languages that hide…

Absolutely this. You need that machine language model of how a computer works to really understand programming, otherwise you are just guessing why stuff works.

I'm not capable at all with assembler, can't write my own compiler.

But my model of how a computer works, in my head, is "functions are just sequences of bits arranged as CPU instructions." I know how it works, even though I can't write a compiler or parser.

And it's absolutely essential to how I program, even in the highest level languages (SQL explain plans).

Re: What can be learned from studying long gone development practices?

#142
I use Spitbol every day. A problem with it is that it allows godawful code like that example. Here's fizzbuzz in Spitbol: loop a = lt(a,100) a + 1 :f(end) output = eq(remdr(a,15),0) 'fizzbuzz' :s(loop) output = eq(remdr(a,3),0) 'fizz' :s(loop) output = eq(remdr(a,5),0) 'buzz' :s(loop) output = a :(loop) end

Even shorter: loop a = lt(a,100) a + 1 :f(end) output = (eq(remdr(a,15),0) 'fizzbuzz',(eq(remdr(a,3),0) 'fizz', (eq(remdr(a,5),0) 'buzz')),a) :(loop) end

Post reply on HN