lua - Why set underscores equal to a function? -


i've searched answer here , elsewhere online, topics deal either iterating table, metatables, or times when _,var1 = do_some_stuff() not case here.

this non-realistic function, containing examples of mean:

function do_some_stuff(data)     _ = some_function(data)     some_other_code     _ = some_other_function(data) end 

wouldn't considered same entering:

function do_some_stuff(data)     some_function(data)     some_other_code     some_other_function(data) end 

i know if create basic lua program both versions run same:

function hello(state)     print("world") end  function ugh(state)     _ = hello(state) -- , w/ hello(state) end  ugh(state) 

i know if there can time _ = some_function() necessary?

there no benefit _ = do_some_stuff(), rather using do_some_stuff() fine , more accepted. underscore provides no benefit when used in way.

thanks etan reisner , mud , clarification.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -