lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Apr 27, 2017 at 2:07 AM, Sean Conner <sean@conman.org> wrote:
>   Perhaps it's because of my extensive background in Assembly and C, but
> what exactly *is* the difference between a pointer and a reference, other
> than hiding the pointer behind some syntactic surgar?

You need a valid target to initialize a reference ( yeah, you may
invoke undefined behaviour somewhere and make it ref *0, but if you
are using it the easy way it makes things clearer, type* => optional,
type& => mandatory ).

Francisco Olarte.