Skip to content

Make use of type dispatch #7

@s-celles

Description

@s-celles

Hello,

Looking at SenseHat.jl code, I noticed (for example)

humidity() = HTS221_humidity()

Maybe you should consider making use of type dispatch

abstract type AbstractSensor end
struct HTS221 <: AbstractSensor
end

humidity()    = humidity(HTS221()) 

Kind regards

PS : I didn't test code

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