-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
125 additions
and
2,304 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,4 @@ | ||
# DynamicObjects.jl | ||
|
||
Implements a dynamic object type which can be redefined with convenient/confusing `.`-syntax and caching. | ||
|
||
See [https://nsiccha.github.io/examples/DynamicObjects.jl/](https://nsiccha.github.io/examples/DynamicObjects.jl/) for examples. | ||
|
||
```julia | ||
using DynamicObjects | ||
|
||
""" | ||
A fancy rectangle. | ||
""" | ||
@dynamic_object Rectangle height width | ||
area(what::Rectangle) = what.height * what.width | ||
|
||
rect = Rectangle(10, 20) | ||
println("A $(rect) has an area of $(rect.area).") | ||
``` | ||
|
||
``` | ||
A Rectangle(height = 10, width = 20) has an area of 200. | ||
``` | ||
|
||
## To add/fix: | ||
|
||
* Defining a single argument type without a type on that argument (e.g. `@dynamic_object Circle radius`) | ||
Provides an `@dynamicstruct` macro, allowing quickly defining structs with cached properties. | ||
See [https://nsiccha.github.io/DynamicObjects.jl](https://nsiccha.github.io/DynamicObjects.jl) for a non-minimal example. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file removed
BIN
-94 Bytes
examples/cache/description_DynamicShape{:Circle}_552480376105565664
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
5f11058
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
5f11058
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/121653
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
5f11058
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
Release notes:
Breaking changes
@dynamicstruct
macro5f11058
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request updated: JuliaRegistries/General/121653
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: