ghost-lang icon indicating copy to clipboard operation
ghost-lang copied to clipboard

Non-existent property access

Open aleclarson opened this issue 7 years ago • 3 comments

What happens when a non-existent property is accessed?

aleclarson avatar Nov 01 '18 17:11 aleclarson

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

tldrRD avatar Nov 02 '18 12:11 tldrRD

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

motss avatar Nov 03 '18 00:11 motss

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 <[email protected] 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 .

aleclarson avatar Nov 03 '18 00:11 aleclarson