Comments (4)
There's one thing that confuses me and needs to be clarified for the patch: Even after removing both get
and Protocol::INDEX_GET
instance functions from Vec's native module declaration I can still do let item = v[1]
in the Rune script, which is completely unexpected.
from rune.
Vector indexing by a number is an internal Vm operation. Range indexing could probably also go there.
from rune.
Ok I understand. Intuitively I would think that neither the integer nor the range indexing should be an internal Vm operation because if there are instance functions in the native modules (like get()
) which are just another frontend to the indexing you have to implement the operations twice.
from rune.
Hm, Vm operation exists because it accelerates the operation. We avoid additional dispatch to the external function which involves a bit of stack mangling.
I'd be open to being able to disable internal acceleration maybe it could be done through a feature flag, but then you'd run the risk of feature parity. All though disabling it completely should probably be supported at some point for folks that really wants a completely bare virtual machine.
from rune.
Related Issues (20)
- Support `derive(Any)` type protocols HOT 1
- Cannot mutate nested field HOT 2
- Using a dedicated enum for the `Try` protocol HOT 2
- "halted for unexpected reason `awaited`" Error HOT 7
- Should `#[rune::function]` be associated if function returns `Self` HOT 1
- Add default `T=()` to `rune::Result` HOT 1
- Modify a vm function
- Feature request: Traits HOT 3
- Support pattern matching which is open `..` in the middle of an array HOT 1
- Memory sandboxing
- Feature request: Support autocomplete for Ace editor
- Function Pointers HOT 2
- 0.13.0 release build failure HOT 7
- Documentation enhancements HOT 1
- Bad link in rune-modules's README
- Support should_panic for rune tests HOT 3
- Error handling in built-in toml module HOT 3
- Feature request: Support variable swapping HOT 2
- Field not available to get on <struct> HOT 1
- WebAssembly 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 rune.