You are spot on. I don't install libs anymore, I just borrow ideas I need and customize as needed. Any modern AI model can write a signals implementation in less than 200 LoC with the stuff most people need, given a single prompt.
The huge amount of extra size in Solid 2.0 is for handling all the various edge cases and extra patterns, for scenarios you may or may not care about. We can borrow ideas and tell an agent exactly what we need in a current project, and done.
The one downside to be aware of is that, as as a codebase gets bigger and bigger, devs will be looking at code and have less idea what is async and what isn't, making projects potentially more difficult to understand and debug (silent) race conditions.
TC39 EcmaScript spec editors adddd `async`/`await` in JavaScript as a feature to make it visually clear (to humans, and now agents) what is async or not, unlike (e.g.) Java with synchronous-looking calls everywhere and no hint at what is async (or multi-threaded) or not.
In Solid 1.0, at least an undefined or null value would need to be checked to make async values a little more explicit, but maybe even that is not as good as a some hypothetical feature we have yet to invent to make this clear in signals world. (Well, there are some generator prototypes for Solid 2.0 using `yield` syntax, which are ultra clear, but also very verbose).
So I'm curious how the race to battle race conditions is gonna turn out. It might be too magical right now.
You can do that with bindings currently. Interface types should only make it easier (for languages with utf-8 strings, as interface types does not support WTF-16 strings like in Java or JavaScript yet).
> I do wonder whether some respondents are incorrectly identifying AssemblyScript as JavaScript?
Perhaps we should include HTML and CSS in the list of languages to choose from next year! :P
I picked JavaScript thinking of AssemblyScript as a tool (not a language) to use JavaScript (with types) as a language compiled to WebAssembly. Maybe the results are not accurate.
I also use Wasm for web (the largest category of use so far) and would not use a JavaScript engine inside Wasm to talk to plain JavaScript in a browser (I don't think any web developer would hehe).
Perhaps the survey should have an option to choose
"JavaScript running in a JavaScript engine inside WebAssembly",
and
"JavaScript compiled to WebAssembly",
to make the results clear as to which "JavaScript" people are using.
Does a JavaScript engine inside WebAssembly even count as a "WebAssembly language"? Or is that C++ and Rust actually?
Does running a browser in WebAssembly make HTML and CSS WebAssembly languages too?
I think that NEAR users just use the SDK, I don't think the users chose JS specifically for it to be in Wasm.
I actually think there's a third way of "using JS to write Wasm", which is to have a JS library which has instructions to emit "hand-written" Wasm bytecode.
Example of such a library: https://github.com/iden3/wasmbuilder
That's actually what I was thinking about when picking this option!
Think of the following situation:
- You're a JS developer, and want to write a client / library mainly with JS
- You want to use Wasm only for some narrow, performance-critical parts
In this case, you may not want to use something like Rust, because that adds tooling overhead, makes the Wasm bytecode bigger & makes it harder to hand-optimize the Wasm. On the other hand, you might not want to directly write the Wasm in raw WAT, because that has crappy DX.
That's definitely interesting, but seems a bit less convenient compared to, for example, writing some TypeScript (compiled to Wasm) and importing that into the JS like we already can with AssemblyScript. AS recently gained the ability to output native ES Modules (containing Wasm and exposing the exported APIs) to import into native ES Modules in plain JS (with type definitions).
If Interface Types doesn't convert WTF strings to UTF, the flaw won't have to be documented, and the risk that someone forgets to do the right thing and causes a program to break will be eliminated. This seems like a better outcome. I haven't been able to think of downsides of not "sanitizing". Can you list those?
The huge amount of extra size in Solid 2.0 is for handling all the various edge cases and extra patterns, for scenarios you may or may not care about. We can borrow ideas and tell an agent exactly what we need in a current project, and done.
reply