Skip to content

Could not we do a native (std) singleton in crystal ? #1

@waghanza

Description

@waghanza

Hi,

While googling to search how could I implement a singleton in crystal, I've found this shard.

However, I have implemented a singleton as following :

class Options
  class_property with_experimental : Bool = false
end

As crystal, is more and more mature (singleton could be native) is this shard still having non-native (not in std) features ?

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions