`create_statement` should not return a shared pointer, but a Statement
Logically it doesn't seem to make sense for a helper function like create_statement to do any memory management. Instead a Statement should be returned by copy (and the compiler will elide this copy).
Just for info : create_statement is often used for setting new statement in the ast. In the current implementation all AST nodes accept shared_ptr (in setter methods) and hence the return type is shared_ptr.
What about this issue?
@ohm314 @pramodk
I understand that @pramodk find it more convenient that create_statement returns a std::shared_ptr
I understand that @pramodk find it more convenient that create_statement returns a std::shared_ptr
What's your opinion on this @alkino ? I have no preference - if you think its "ok" as it is, lets close the issue. If you think this is "bad", see if it's easy to change.