Talk:Stack-oriented programming: Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile app edit
Cewbot (talk | contribs)
m Maintain {{WPBS}} and vital articles: 1 WikiProject template. Create {{WPBS}}.
 
(14 intermediate revisions by 7 users not shown)
Line 1:
{{Talk header}}
{{WikiProject banner shell|
{{WikiProject Computing}}
}}
{{findsourcesnotice||OR "stack-based programming language"}}
 
==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. [[User:Klparrot|Klparrot]] 16:43, 3 May 2007 (UTC)
Line 13 ⟶ 14:
:"A stack-oriented programming language is one that relies on a stack machine model for passing parameters"
 
That implies all nested block structure languages are stack oriantedoriented languages and doesn't distinguish the ones that actually have stack operators in the language. Stack orianted languages are aanalogous subset ofto stack based languaged. And passingPassing parameters on the call stack is not required.
 
It also excludes lenguageslanguages that do not have parameter.parameters, Forfor example a language of functions that operate on a character stream (or string) and manipulatesmanipulate stacks directly.
 
[[TREE-META]] is one example. CWIC another. They are metacompilers. The syntax language is syntax equationequations, boolean functions. Each euation expresses a goal, recognizing some language structure. They are boolean equations that analyze an input character stream and return success(true) or failure(false). Using operates like ''''':'''<node>'' that creates a node and pushes it onto the node stack and '''''!'''<number>'' that creates a tree, taking the top node stack entry and the top ''<number>'' of parse stack entries putting them to gather to form a tree that is pushed on that parse stack. The +[ ... ]+ make a list of parse stack entries pushed between them.
 
A set of syntax functions that parse an arithmetic expression building a abstract syntax tree on the parse atack:
Line 27 ⟶ 28:
num .. dgt dgt* MAKENUM();
</pre>
expr is a function who's goal is to first recognize a term. Then some number of term may be added to or subtracted from the first expresed by:
(('+':ADD|'-':SUB) term!2)*
The Kleene star is used to express that zero or more ('+' or '-' term) may follow.
Line 43 ⟶ 44:
</pre>
The syntax equations described are from the CWIC syntax language only using the Kleenex star '''*''' instead of the CWIC zero or more $ operator. expr using $ operatot:
expr = term $(('+':ADD|'-':SUB) term!2)*;
 
The id and num '''..''' equation are token making euations. id catalogs the parsed characters in the dictionary creating a symbol object that is pushed in the parse stack. The num equation recognizes sequence of one or more dgt. MAKENUM() is a function call that intercepts the dictionary processing. It creates a numeric object from the dgt sequence and pushes it or the parse stack.
 
The SYNTAX language is a goal orianted, stack oriented, string processing language. <u>There are no parameters</u> on the call stack or any returned. Success ot failure is commonly a processor status state that can be tested using hardware branch on condition instructions. The parse and node stacks liken to global variables.
[[User:Steamerandy|Steamerandy]] ([[User talk:Steamerandy|talk]]) 22:42, 29 January 2016 (UTC)
 
===A more fitting description===
 
Can we change to to use [[Stack (abstract data type)|stack]] instead:
 
'''stack-oriented programming language''' is one that relies on a [[Stack (abstract data type)|stack]] (or [[Stack (abstract data type)|stack]]s) for manipulating data and/or passing [[Parameter (computer programming)|parameters]]. Several programming languages fit this description, notably [[Forth (programming language)|Forth]], [[RPL (programming language)|RPL]], [[PostScript]],
 
[[User:Steamerandy|Steamerandy]] ([[User talk:Steamerandy|talk]]) 18:04, 21 February 2016 (UTC)
 
== Program refinement ==
Line 76 ⟶ 86:
 
Thanks :) <small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Daemonicky|Daemonicky]] ([[User talk:Daemonicky|talk]] • [[Special:Contributions/Daemonicky|contribs]]) 13:18, 23 August 2011 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->
 
:I do not see how assembly can in any general sense be stack anything. There are computers with no hardware stack of any kind. Though most today have at least a call stack. Though that does not exclude stack orianted assembly languages for specific stack machines.[[User:Steamerandy|Steamerandy]] ([[User talk:Steamerandy|talk]]) 05:09, 7 September 2018 (UTC)
 
== Requested move 21 May 2018 ==
 
<div class="boilerplate" style="background-color: #efe; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;"><!-- Template:RM top -->
:''The following is a closed discussion of a [[WP:requested moves|requested move]]. <span style="color:red">'''Please do not modify it.'''</span> Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a [[Wikipedia:move review|move review]]. No further edits should be made to this section. ''
 
The result of the move request was: '''moved as requested''' per the discussion below. [[User:Dekimasu|Dekimasu]]<small>[[User talk:Dekimasu|よ!]]</small> 07:09, 29 May 2018 (UTC)
----
 
[[:Stack-oriented programming language]] → {{no redirect|Stack-oriented programming}} – like the other [[:Category:Programming paradigms|programming paradigms]] [[User:Horcrux92|Horcrux92]] ([[User talk:Horcrux92|talk]]) 23:47, 21 May 2018 (UTC)
* '''Support''' per [[WP:CONSISTENCY]] and [[WP:CONCISE]], and even [[WP:PRECISE]] in that the current name is over-precise for no reason. It doesn't really seem to match the scope, anyway. This isn't an article about a programming langauge named "stack-oriented programming", but a type of programming language (i.e., a paradigm, as the nom said). <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 02:25, 23 May 2018 (UTC)
* '''Support''' for consistency. -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 18:31, 23 May 2018 (UTC)
----
:''The above discussion is preserved as an archive of a [[Wikipedia:Requested moves|requested move]]. <span style="color:red">'''Please do not modify it.'''</span> Subsequent comments should be made in a new section on this talk page or in a [[Wikipedia:Move review|move review]]. No further edits should be made to this section.''</div><!-- Template:RM bottom -->