‹ BackHN Continuity

Thread

Needed 1+1, built a functional programming language

151 points · 80 comments · birdculture

  1. herodotus · · focus · HN ↗
    I once invented a programming language where EVERYTHING was an object. No message keywords. 1 is an object. + is an object. You can send an object to another object - you get back an object. Example 1+ is an object. Its is the result of sending + to 1. If you send 1+ the object 1, you get 2. If you send 1+ the object + you get a run-time type error. You can also go left to right. +1 is an object. If you send +1 to 2, you get 3. It gets nice when you add list objects. (1,2,3,4,5)+1 => (1+,2+,3+,4+,5+) 1 => (2,3,4,5,6). And so on.
    1. TazeTSchnitzel · · focus · HN ↗
      This sounds a bit like Smalltalk! But with partial application…

      It also reminds me of the Emily programming language: <a href="https:&#x2F;&#x2F;github.com&#x2F;mcclure&#x2F;emily&#x2F;blob&#x2F;stable&#x2F;doc&#x2F;tutorial.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mcclure&#x2F;emily&#x2F;blob&#x2F;stable&#x2F;doc&#x2F;tutorial.md

      1. WorldMaker · · focus · HN ↗
        Yeah, the Smalltalk and Self family take this &quot;everything is an object&quot; approach, sometimes to extremes.

        Another relatively well known language in this space for its use as an alternative to especially Lua in embedding situations is Io: <a href="https:&#x2F;&#x2F;iolanguage.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;iolanguage.org&#x2F;

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.