Stacks

Sep. 13th, 2007 04:48 pm
purplecat: Hand Drawn picture of a Toy Cat (agents)
[personal profile] purplecat
I'm in a horrendous muddle about stacks. Java lets you do all sorts of cunning and unforgivable things with stacks (like take things off the bottom of them, or shove things onto the bottom of them). As a result my program appears to be full of stacks and stacks of stacks none of which have tops or bottoms where I think they are.

Then I try to print them out to see what they look like and I'm not even printing them in the right order so I'm still confused about what is at the top of the stack and what is at the bottom of the stack.

SENSIBLE languages don't let you do anything bad with stacks as a result of which you never have to worry about which is the bottom and which is the top. This whole stack confusion thing is coming as something of a shock.

(no subject)

Date: 2007-09-13 04:17 pm (UTC)
From: [identity profile] scimon.livejournal.com
Thing is if you can add to it in arbitrary places it's an array not a stack. They have their uses too.

Personally I'm interested in playing about with erlang, it looks fun.

Profile

purplecat: Hand Drawn picture of a Toy Cat (Default)
purplecat

January 2026

S M T W T F S
    12 3
45 6 78 9 10
1112 131415 16 17
1819202122 23 24
25262728293031

Tags

Style Credit

Expand Cut Tags

No cut tags