This package provides a macro-based implementation of traits, using Tim Holy's trait trick. The main idea behind traits is to group types outside the type-hierarchy and to make dispatch work with that grouping. The difference to Union-types is that types can be added to a trait after the creation of the trait, whereas Union types are fixed after creation. The cool thing about Tim's trick is that there is no performance impact compared to using ordinary dispatch. For a bit of background and a quick introduction to traits watch my 10min JuliaCon 2015 talk.

Features

  • Default argument and keyword argument trait functions
  • Traitor.jl-like syntax
  • All traits have one or more (type-)parameters to specify the type to which the trait is applied
  • Vararg, default argument and keyword argument trait functions work
  • Documentation available
  • Examples available

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow SimpleTraits.jl

SimpleTraits.jl Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SimpleTraits.jl!

Additional Project Details

Programming Language

Julia

Related Categories

Julia Data Visualization Software

Registered

2023-11-24