Talk:Tangle bracket language
Jump to navigation
Jump to search
This is how I expect the untangled version of the example code might be (assuming x has no side-effects):
while(x && y) doSomething(); if(!x) doSomethingElse();
--Zzo38 (talk) 07:25, 21 July 2015 (UTC)
Would it be possible to switch ) and ( as well? After all, we should be able to tell from context if an opening or closing bracket makes sense --Rottytooth (talk) 21:31, 27 July 2015 (UTC)
- Can you please elaborate?
- If you mean that ( and ) could be used in place of {} and [], they could, but it'd be a pain to parse. I just used [] and {} as examples, this isn't an actual language.
- Hppavilion1 (talk) 07:26, 28 July 2015 (UTC)
- Sorry, I meant using left and right brackets interchangeably and determining whether it's opening or closing purely by context. So:
while)x && y(
- would be equivalent to:
while(x && y)
--Rottytooth (talk) 14:13, 28 July 2015 (UTC)
- Oh. Yes, you could definitely do that, but that isn't what a tangle bracket language is. In a tangle bracket language, the concept of nesting is disposed of, so an IF construct that begins inside a WHILE construct can still end outside of that same while construct. The page was supposed to mean that "[]" and "{}" do the same thing, but a "{" doesn't end at the corresponding "}" or "]", it ignores all the "]"s and only ends at the corresponding "}". Get it, or am I still being unclear? Hppavilion1 (talk) 19:43, 28 July 2015 (UTC)