Talk:Stack-oriented programming
![]() | Computing Unassessed | |||||||||
|
This article should be split up in 2 articles. It confuses 2 meanings of stack-based languages: 1. Languages that define all operations as stack based (this article). 2. Languages that need stack-based processors, hence are inherently stack-based languages.
Indeed a lot of languages are stack-based: C, C++, Pascal, Modula, Smalltalk, Visual Basic. In fact all /most(?) function-based languages need a stack-based processor.
BASIC (the version with line number) is a language that doesn't necessarily need a stack-based processor (that is, when no subcalling is implemented (GOSUB)).
The above ("doesn't necessarily need a stack-based processor") is true for most languages, since stacks can easily be implemented in low level software. Non-recursive sub routines can effectively be called without a stack at all, too, through self modifying code (this is how it's done on Propeller processors, AFAIK). For conveniently parsing mathematical expressions in language such as BASIC, i think that you are stuck using an expression stack, though. 88.131.41.70 (talk) 14:08, 8 June 2011 (UTC)
Confusion in "Operations of the stack" section
- I've added a disputed-section tag to the Operations of the stack section. I think it confuses the input and the stack. The input is a stream which can only be popped from. If you pop an operand from the input, you push it on to the stack. If you pop an operator from the input, you pop operands from the stack (however many the operator takes), perform the operation, then push the result on to the stack. I'll take a crack at rewriting the section. Klparrot 16:43, 3 May 2007 (UTC)
Excellent!
A very well written article, kudos! —Preceding unsigned comment added by 86.8.124.145 (talk) 12:50, 21 June 2009 (UTC)
Program refinement
Are there techniques on how to refine abstract mathematical descriptions to stack-oriented programming languages? E.g. how did someone come up with the Fibonacci number example provided in this article? Reading the provided source code it is not trivial to see that it implements the Fibonacci number series. --Abdull (talk) 19:12, 9 October 2010 (UTC)