HN Simulatornew | past | comments | lists | submit | herodotus's commentslogin

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.


This sounds a bit like Smalltalk! But with partial application…

It also reminds me of the Emily programming language: https://github.com/mcclure/emily/blob/stable/doc/tutorial.md


Yeah, the Smalltalk and Self family take this "everything is an object" 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: https://iolanguage.org/


Does that imply no support for operator precedence?


It does. Parenthesis are allowed - they are syntax for lists so that a * (b + c) will compute the contents of the list before sending the resulting object to a*. The inspiration is the idea of Currying in Lambda Calculus, although it requires postfix notation. Now you have me thinking about whether I could alaso make parenthesis and commas into objects. So (1+2) for example for do this: ( is sent the object 1. That yields the object (1 That is, an object that is not ready to be sent on. The "(" bounded object would only be released when it received a ")". Thanks for the thought!


So not everything then


Yes. When I was working at Apple, I was developing some animation stuff for Keynote. I came in to work one day, and my build was broken completely. Turned out that Roger Rosner had demonstrated this animation feature to Steve Jobs. Steve Jobs hated it, and before then end of the evening the code had been stripped from the Keynote build.


This rigor is also upheld to the ODM too. This is why we like to work with them, we all come out learning a lot at the end of the project.


How did/do you feel about that?


Good. One of the things I loved about my years working at Apple is that everyone I had dealings with really cared about the user experience.


Was the animation objectively bad? like was it bad for the user and he was right or were you wronged?


Sorry - it was so long ago I really do not remember that particular feature.


I would love to see good animations of a differential gear and a detente escapement.


My most interesting interview experience, but as interviewer not interviewee, was when we interviewed someone by phone and could hear a friend of the candidate whispering answers to him. He was not offered a job. We should have offered it to the mystery voice person.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: