Comments (2)
safe rewrite will take this block, try to parse it, extract some information and possibly transform the parse tree, and then rewrite the block as ruby again. some illegal ruby will break this and we'll catch it then. some illegal ruby will look 'legal enough' to get parsed and rewritten and will fail at runtime, as it would have if written in 'pure' ruby. wouldn't doing what you suggest ("catch stuff" instead of letting ruby catch it) duplicate functionality?
from bud.
it duplicates functionality in exactly the same way a static type system duplicates the functionality of a runtime exception with a compile-time exception. in other words, what i'm proposing is more compile-time safety. in general, i think that's a good thing because catching errors at runtime may be very costly, but the specific reason i opened this ticket is because in the REPL, no execution happens by default until the user explicitly types a "/tick" command. this means they can enter arbitrarily many messed up statements (undefined identifiers, type errors, etc), and nothing will fail until they hit "/tick". what do you do when something fails on /tick? if you have static checking, then nothing can "fail" on tick. if you don't have static checking, then either the REPL has to understand the error thrown by Ruby, and understand how to fix the program, or the user has to understand the error message and do some back and forth where they remove and re-add rules to get it working. the last way seems kind of ugly, but then again i suppose it's what you'd expect from an interpreted, duck-typed language like Ruby.
i just thought of another way to fix this in the REPL, I could tick by default whenever any code was added.
from bud.
Related Issues (20)
- Suggestion: "Trace" function?
- tables without deltas don't replenish downstream tables HOT 5
- file_reader not working due to missing tick definition
- Support determinism annotations for functions invoked by Bud?
- new "attribute not found" error HOT 1
- Referencing a collection's schema in a rule body introduces a dependency on that collection HOT 1
- Consider memoizing TupleStruct#hash
- Declaring a temp collection using the wrong syntax causes a confusing Bud::CompileError HOT 1
- Exceptions should not be silently ignored HOT 3
- s
- Wrong output for 3-way join HOT 2
- Crash when tracing programs that send nested lattices in channels
- Outer join bug w/ multiple preds
- Confusing error message when using <~ on non-channels
- Problem reading from Zookeeper-backed collections
- array assign to memo in reduce errors out HOT 1
- Incorrect stratification error HOT 1
- Hash-rocket join syntax bug/misfeature
- Better Error Message for Lattice Function in Bootstrap Block
- Update README.md with additional requirement
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 bud.