‹ BackHN Continuity

Thread

Goose Programming Language

54 points · 69 comments · bobbydigitales

  1. RantyDave · · focus · HN ↗
    So if nothing moves, you can't make an array that grows?
    1. bobbydigitales · · focus · HN ↗
      <a href="https:&#x2F;&#x2F;github.com&#x2F;aardappel&#x2F;goose&#x2F;blob&#x2F;master&#x2F;samples&#x2F;02_memory.goose" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aardappel&#x2F;goose&#x2F;blob&#x2F;master&#x2F;samples&#x2F;02_me...
    2. codys · · focus · HN ↗
      It appears they got around that by making expanding and contracting data arrays builtin types the compiler impls. And it does this by creating what they call a &quot;data stack&quot; for each thing that needs to grow. To me it reads like &quot;we have a builtin type that hides the heap allocation and does the free at the scope exit &quot;, which is fine I guess as it keeps the nature of the language in tying lifetimes strictly to function scopes.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.