Talk:Balanced brackets: Difference between revisions

Undiscussed deletion of two JavaScript contributions on June 5 2016
(→‎Java incorrect: Clarified.)
(Undiscussed deletion of two JavaScript contributions on June 5 2016)
 
(3 intermediate revisions by 2 users not shown)
Line 23:
:Actually there is. I didn't read it that way at first though. I thought the task wanted two separate functions. I'll fix it later today. --[[User:Mwn3d|Mwn3d]] 13:38, 22 February 2011 (UTC)
::I've added clarification. --[[User:Paddy3118|Paddy3118]] 13:45, 22 February 2011 (UTC)
 
==On "Constructing correctly balanced strings"==
I read the task as being primarily about checking for balanced strings and the generator being part of a check. I was hoping to find comments on how to generate longer strings with equal probability of being balanced or not.
The Tcl interpretation fits too though. --[[User:Paddy3118|Paddy3118]] 09:57, 24 February 2011 (UTC)
 
: I created the 3<sup>rd</sup> REXX programming example to generate &nbsp; ''all'' &nbsp; 20-character (or less) random possibilities (over 125,000 permutations). &nbsp; Of course, it didn't list each of the 125,477 unique strings, but it shows a count of balanced ''vs''. unbalanced strings. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 09:54, 10 September 2015 (UTC)
 
== usefulness of task ==
 
I have a use for something like this, but to make it useful, any character not a grouping symbol is essentially ignored, but parsing for quoted strings is done with multiple deliminters allowed, namely the double quote ["] and the apostrophe ['].
<br>The input strings are essentially statements for assignment to variables.
<br>The allowable grouping symbols being <tt> ( ) [ ] { } « » </tt> (and could be expanded).
<br>Equations of the sort: <tt> xxx=]yyy+zz[ </tt> are, of course, illegal (even though they "pair up").
<br>The equation: <tt> zz='(' </tt> is legal.
<br>I had a difficult time programming to catch errors like: <tt> xxx = ((a+ [b/c)] ) </tt>.
<br>Such a generalized task, I guess, would better be served with its own task. -- [[User:Gerard Schildberger|Gerard Schildberger]] 23:29, 31 March 2012 (UTC)
 
==Undiscussed deletions (JavaScript) on June 5 2016==
 
I notice that a couple of JavaScript contributions were deleted without discussion on June 5 2016, on the grounds (suggested in the edit comment) that they were felt to be 'over-engineered'.
 
Deletion will sometimes be constructive, but does needs to be discussed. In this case, for example, functional composition of JavaScript code was left unrepresented (the new example was imperative, and the deleted functional example was not replaced).
 
I have restored, for the moment, an ES6 version of a functional approach, which also provides visual indication of where the brackets become unbalanced. If you feel that it would really be better to delete it again, you are very welcome to make that argument here on the discussion page. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 11:19, 4 November 2016 (UTC)
9,655

edits