Comments (5)
That's now getting a bit more into design specifics: a VectorColumn
, e.g., will also panic if you have only five elements and call get(23)
. We might consider changing the Column
trait to have a get(usize) -> Option<T>
and a get_unchecked(usize) -> T
to handle that, as std::vec::Vec
does.
from nemo.
Having a CONTRIBUTING.md
is surely a good idea, and also a good place to put down such decisions.
from nemo.
My views on this are as follows:
- any error that potentially traverses the crate boundary (i.e., anything that does not get handled by the crate itself, or that
panic!
s) is acrate::error::error
, - an error that is handled by the same module can be a simple
struct
, or anenum
if there are multiple variants, - errors exposed to the rest of the crate have a corresponding variant in
crate::error::error
, which can be#[from]
a module-level errorenum
, - errors from the standard library have a
#[error(transparent)]
variant incrate::error::error
, panic!
(andexpect()
,assert!
, etc.) is fine for situations that should not occur, e.g., if there is some invariant that makes the situation impossible, or where graceful recovery is impossible, but not otherwise, andunwrap()
should (almost?) always beexpect()
instead
from nemo.
My views on this are as follows:
- any error that potentially traverses the crate boundary (i.e., anything that does not get handled by the crate itself, or that
panic!
s) is acrate::error::error
,- an error that is handled by the same module can be a simple
struct
, or anenum
if there are multiple variants,- errors exposed to the rest of the crate have a corresponding variant in
crate::error::error
, which can be#[from]
a module-level errorenum
,- errors from the standard library have a
#error(transparent)
variant incrate::error::error
,panic!
(andexpect()
,assert!
, etc.) is fine for situations that should not occur, e.g., if there is some invariant that makes the situation impossible, or where graceful recovery is impossible, but not otherwise, andunwrap()
should (almost?) always beexpect()
instead
My point of view is quite the same. Though I don't think that we have cases where we shall outright panic. Just wrapping the issue into an error and let it traverse to the top level sounds much more recoverable. (Lets say in the rle case - an error could allow to just use another column which works, while panic makes it outright impossible to react)
Note 'sanity' checks, like the one in rle are fine though.
from nemo.
Another thing we still need to decide is to where we are listing all these design decisions.
I think a CONTRIBUTING.md would be the natural way of collecting all conventions and strategies for implementing things in this project.
How are your positions on this?
from nemo.
Related Issues (20)
- Debug Assert in Variable Order failes for rule with multiple constructors HOT 2
- Type Error depending on input HOT 1
- Min/max as built-in arithmetic functions HOT 3
- Problems when evaluating multiple levels of arithmetic definitions
- Represent zero-column relations (aka booleans) in the `PartialTrieScan` interface?
- Error output: Add line number & relation HOT 1
- Problem with new variables in body and inequality
- `resource` in `@export` statements is not used to determine the output path HOT 2
- negation error with constants inside the negated atom HOT 1
- Bugtracker for the data-model branch HOT 3
- Fix serialisation of IRIs with percent encoding
- Constants dont produce facts when passed through the body
- DATAYPE function should return IRI, not string
- SUBSTR function should support optional third length parameter HOT 1
- Built-in functions should work as atoms
- Logical model should support nested structured terms with variables
- Numeric functions should support all numeric datatypes, possibly mixed HOT 1
- Support Tracing for Aggregates
- Incomplete reasoning results with multi-datatype table
- Of-by-one error in SUBSTRING function HOT 1
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 nemo.