The stack-oriented tag has no wiki summary.
3
votes
6answers
1k views
Coding style for chained function calls
A common thing you need to do is to take a value, do something with it by passing it to a function, and then do some more with the return value, in a chain. Whenever I run into this type of scenario, ...
11
votes
2answers
705 views
Is there a need for garbage collection in a stack-based language?
What is the need for garbage collection (GC) in a stack-based language? In a language like Forth or RPL (on HP calculators), is there a need for garbage collection?
I would think, since output is ...
7
votes
4answers
900 views
What problems are stack oriented languages well-suited and ill-suited for?
Stack-oriented programming is a pretty non-widely used paradigm (well, PostScript gets used under the hood a bit here and there). This in mind, what problems are stack-oriented languages good at? What ...
8
votes
1answer
596 views
Status of stack based languages
I have recently become curious about Factor, which, as far as I understand, is the most practical stack-based language around. Forth seems not to be used much these days - I think it is because it was ...
11
votes
3answers
439 views
Which are the alternatives to using a stack to represent function call semantics?
We all know and love that function calls are usually implemented using the stack; there are frames, return addresses, parameters, the whole lot.
However, the stack is an implementation detail: ...
21
votes
6answers
44k views
Stack and Heap memory in Java
As I understand , in Java, Stack memory holds primitives and method invocations and heap memory is used to store objects .
Suppose I have a class
class A {
int a ;
String b;
...