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

February 2026

S M T W T F S
123456 7
89 101112 13 14
1516 1718 1920 21
22232425262728

Tags

Active Entries

Style Credit

Expand Cut Tags

No cut tags