Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Enhancement suggestion: export list type #19

Closed
jung-kurt opened this issue Dec 5, 2013 · 3 comments
Closed

Enhancement suggestion: export list type #19

jung-kurt opened this issue Dec 5, 2013 · 3 comments
Assignees

Comments

@jung-kurt
Copy link

A common use case is to wrap Execute in a function that performs error management and other housekeeping tasks. However, this is prevented because the return value of Compile is not exported. I think it would be desirable to change

type list struct {
    l []stmt
}

to

type List struct {
    l []stmt
}

This keeps the statement list private but allows the caller to pass the list to other functions.

-- Kurt Jung

@ghost ghost assigned cznic Dec 5, 2013
@cznic
Copy link
Owner

cznic commented Dec 5, 2013

#Thinking

@cznic cznic closed this as completed in ccb9505 Dec 5, 2013
@jung-kurt
Copy link
Author

Perfect! Thanks for the change.

Now, to keep lint and document readers happy, List needs a comment. Something like

// List represents a group of compiled statements.

-- Kurt Jung

@cznic
Copy link
Owner

cznic commented Dec 5, 2013

My bad :-(

@cznic cznic reopened this Dec 5, 2013
@cznic cznic closed this as completed in 05cda91 Dec 5, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants