Comments (2)
hey pepa65, glad you're enjoying the project! I don't have any objections to your solution, just need to think through all the edge cases before dropping something, I do believe the (def() ...)(args)
syntax comes in handy in a few other places that I'd need to dig deeper for.
Unfortunately, this project is lately not getting as much attention from me as it did in the past simply because I have a job and a family now and I don't see a way to monetize something like this to work on it full-time. @valq7711 has been maintaining it in the meantime. The nice thing is that the project syntax is generic enough such that it doesn't really show its age much even with ES6, but it definitely would be nice to introduce some new enhancements, simplify the code-base, and remove some dependencies/boilerplate in favor of native solutions.
For example, I'd love to someday get to the following:
- rip out all logic for generating backwards-compatible ES5, even babel can probably be done away with, let's just compile into typescript w/ optional static typing and automatic type inference
- automatic type inference was another project I worked for a while alongside this one (called it Interstate as a pun, because it tracks state) but never ended up getting it finished (too many edge cases). I can open the other project up to the public if there is any interest in it. If finished, the idea was to have it be promise-based so it can backwards-resolve types for variables it already saw earlier but didn't have enough information to identify - TypeScript can't do this, it wasn't designed for this because it's a bit of a brainfuck to code that way. That, and banning reuse of variables for different data types gets you surprisingly close to being able to identify types without making your javascript look like java (which is my main pet peeve with TypeScript)
- operator overloading without function wrappers that add overhead. I believe this is possible already, as long as user accepts possible performance overhead for being too vague with the types and annotates them when possible, RS could compile them to function unless the types are identified, then unroll them into base operations, the compiler already does the same logic quite well for deep-equality operator, where compiler manages to replace it with much-faster identity operator from types alone at compile time. The other 10% of the cases, it falls back to an approach that still saves the expensive function call overhead when possible.
Anyhow, those are just some ideas if I had more time to work on it. If you have time and want to contribute, I'd love to have you join.
from rapydscript.
Thanks for the extensive response! The project looks usable and functional in its current form, and your ideas for improvements make it better, but not a whole lot more functional (except perhaps point 3).
Completely understand about other priorities, for now it's keeping this project in a satisfactory state for you. Cheers!
from rapydscript.
Related Issues (20)
- append method does not compile to js push method HOT 1
- VSCode extension for syntax highlighting HOT 4
- cannot compare string HOT 3
- Typescript has problem compile RS --es6 output at class attributes HOT 2
- Why not support in-browser compiler? HOT 2
- enhancement: check for already reserved words like: enum HOT 18
- Cannot resolve python imports HOT 8
- Is that possible to parse python code to js AST? HOT 1
- fstring support. HOT 1
- How to keep all comments HOT 8
- Can't find python module that is installed and available? HOT 1
- Cannot catch ImportError HOT 2
- Cannot import from custom module in different directory HOT 5
- How to use RapydScript with JavaScript MutationObserver HOT 1
- Question about feasibility: option to use JS function syntax for nested functions, especially inside dicts/object-literals HOT 7
- How to run code snippets from tutorials on old Android? HOT 1
- Computed and negative slices
- TypeError: undefined is not a function HOT 1
- Compiler issues 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 rapydscript.