jamiebuilds / ghost-lang

:ghost: A friendly little language for you and me.
302 stars 10 forks source link

Non-existent property access #16

Open aleclarson opened 5 years ago

aleclarson commented 5 years ago

What happens when a non-existent property is accessed?

tldrRD commented 5 years ago

Maybe implement something like the Elvis operator? It's pretty straightforward and readable.

motss commented 5 years ago

I think we need optional chaining - https://github.com/tc39/proposal-optional-chaining

aleclarson commented 5 years ago

Both the "Elvis operator" and "optional chaining" are tangential to this topic, and they need their own threads.

I'm asking if null is returned or an exception is thrown, etc.

On Fri, Nov 2, 2018, 8:32 PM Rong Sen Ng <notifications@github.com wrote:

I think we need optional chaining - https://github.com/tc39/proposal-optional-chaining

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jamiebuilds/ghost-lang/issues/16#issuecomment-435545891, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1i0IqER2yFtPjMZ94V5nn65YmH0Visks5urOQVgaJpZM4YH4aR .