Skip to content

Package/type naming #43

@gunnsth

Description

@gunnsth

Currently we have our core/... packages that are truly core to unipdf as it can be imported anywhere, should not rely on any other package (except internal utility packages).
It defines all the primitive types:

core.PdfObject
core.PdfIndirectObject
core.PdfObjectDictionary
core.PdfObjectArray

Would it be nicer to have

core.Object
core.IndirectObject
core.Dictionary or pdfcore.Dict
core.Array
core.String

? or is that not specific enough, maybe

pdfcore.Object
pdfcore.Dictionary or pdfcore.Dict
pdfcore.Array
pdfcore.String

etc. ?

Similarly for model package, there are some pretty lengthy names:

model.PdfPage
model.PdfPageResourcesColorspaces
model.PdfColorspaceDeviceNAttributes

Clearly the name space in PDF models is pretty huge, however it might be possible to improve here. What about

pdfmodel.Page
pdfmodel.ResourceColorspace
pdfmodel.ColorspaceDeviceNAttributes

or

pdf.Page
pdf.ResourceColorspace
pdf.ColorspaceDeviceNAttributes

Would be interesting to get some input on this. We are always looking on ways to improve the internals, although it can take time and would obviously not appear until in a future major version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions