Comments (6)
Other choice is to have same kind of thing as the Approx* variants, but that creates lots of bloat.
However it has the benefit of being more flexible: If the unsafe just needs the one algebraic property to be safe, it can be encoded.
from algebra.
I really don't know… This does not actually provide any type safety, it's more like waving a red flag: “Hey, you might potentially mess up memory management by using this!”
Rust is missing dependent types for this to be actually useful. And in the current situation I'm not sure whether I would really use this for encoding semantics that are not inherently memory-unsafe. After all, would you really rely on such properties of an abstraction when implementing unsafe code? This isn't going to make it any safer.
from algebra.
Well the whole unsafe
keyword is basically just waving red flag too so I don't see big difference with this vs it.
I do agree that dependent types would make it more useful, but still it's better than nothing?
And yeah I don't really have good use case for this yet.
from algebra.
Sure, but you are mostly asserting the memory-safety of whatever you are doing inside. I find it somewhat confusing to use the keyword to convey other semantics, that can't be strictly enforced at compile-time. I guess, it's a trade-off?
But yeah, a use case would certainly be a nice example to drive this discussion. Comparing what it looks like and how the old behaviour might surprise a user, where adding an unsafe trait like that would help.
from algebra.
Hey @WaDelma, would you be interested in taking over this library? I don't currently have a great deal of time to spend on it, and you seem interested in pushing it forwards - which is great!
from algebra.
Well I would be interested if I had stronger knowledge on algebra... I really would like this to be thing that can be used, but I don't know if I can make it work.
from algebra.
Related Issues (20)
- Investigate other property APIs
- Better issue labeling scheme HOT 3
- Algebraic structures should automatically be implemented for types satisfying compontent properties HOT 12
- Upload to Crates.io HOT 2
- Add ApproxEq trait with asserts HOT 8
- Separate equality constraints from structure traits HOT 2
- Implement ring-like structures HOT 2
- Vector spaces HOT 6
- Abstract operators out of structural traits HOT 23
- Wrapper structs to use a richer structure as a lesser one HOT 1
- Identity traits and RFC 1214
- Quickchecks fail in debug mode because of overflows HOT 1
- Consider using brendanzab/approx for approximate equality traits. HOT 7
- Enable travis on pull requests.
- Wrapper struct for ops are annoying to use. HOT 7
- Discuss practical usages of algebraic structures in real world code HOT 3
- All operators should be parameterized for more general cases. HOT 2
- Merge with epsilonz/algebra.rs HOT 2
- Reorder trait names HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from algebra.