3 ms·
Why is the iterator implemented as a GOTO instead of something like the following? Genuine question, I don't use stack based langs. <loop> <loop-statemen
by dexwiz 3y ago
Why is the iterator implemented as a GOTO instead of something like the following? Genuine question, I don't use stack based langs.
<loop>
<loop-statement></loop-statement>
</loop>
- recursivedoubts 3y agoin designing HTML, the programming language, i tried to stay as close as possible to existing semantics in HTML, the markup language, as I could, so that HTML, the markup language, developers would be comfortable with it in a minimum amount of time most HTML, the markup langauge, developers are used to anchor tags (i.e. the <a> tag) with an href that begins with a hash "jumping" to that element. Therefore I decided to take that well known semantic and integrate it into HTML, the programming language. there are multiple examples of loops using this (as well as the <i> "if" conditional) tag that I think show how intuitive this will be for most HTML, the markup language, developers, but of course research is ongoing in this and other matters
- dexwiz 3y agoI guess I don't really think of HTML as "sequential" but I definitely do think of it as "composed." Meaning I don't often consider siblings elements, but I often do consider parent/child elements. Anchor tags that link to other parts of the doc are relatively rare compared to links to other docs. The only exception is stuff like schema definitions or reusable shapes in SVGs. Either way, fun project!
- recursivedoubts 3y agoresearch ongoing!
- PrimeMcFly 3y ago> Genuine question, I don't use stack based langs. How and why not? What languages do you use?
- dexwiz 3y agoCommon ones like JavaScript, Java, C#, etc. They all have a stack, but aren't stack oriented like Assembly or Forth. The stack in modern languages is abstracted so you don't have to worry about pushing/popping values in a specific order, and you can't explicitly reference it. C and Rust is probably the closest I get with Heap v Stack memory, but even that is not truly stack oriented. https://en.wikipedia.org/wiki/Stack-oriented_programming https://en.wikipedia.org/wiki/Stack-oriented_programming
- PrimeMcFly 3y agoAh gotcha. Thanks.
- toasterlovin 3y agoWas literally reading that wikipedia page last night before bed, so this is all very timely for me.