4 ms·
For me the best part is the examples: https://github.com/scf4/callbaxx/tree/master/examples https://github.com/scf4/callbaxx/tree/master/examples Also, someday
by paulogdm 8y ago
For me the best part is the examples: https://github.com/scf4/callbaxx/tree/master/examples https://github.com/scf4/callbaxx/tree/master/examples
Also, someday I think we need to launch an API (REST or Graph) to do some basic operations as API calls. So you don't even need a whole language, just lots of fetchs.
- paulogdm 8y agoAnd it keeps getting better: https://github.com/scf4/callbaxx/pull/12 https://github.com/scf4/callbaxx/pull/12
- scottmf 8y agoThat's a fantastic idea. What about a babel plugin to transform all code into fetches to a proprietary REST API? By doing all of the work for them, we'd ensure reliability with common operations like + and /, which obviously means we eliminate the need for tests! This would allow devs to move and break things even faster, while we/I collect $10–$20 per 10,000 API calls. E.g., // Regular code console.log(3 + 2); // Transpiled code console.log(await fetch('http://fetchify.io/add/3/2')); // Regular code const isFive = (x === 5); // Transpiled code const isFive = await fetch(`http://fetchify.io/equality/strict/${x}/5`) .then(body => body.text()); Some of this is almost too easy to understand though, therefore it's pretty amateurish and we're not doing proper programming. What about something like: // Regular code const thirty = 5 * 6; // Transpiled code let $$_tmp1; const thirty = ( $$_tmp1 = await fetch(`http://fetchify.io/multiply/5/6`), $$_tmp1 = await $$_tmp1.text(), $$_tmp1 = parseInt($$_tmp1, 10), $$_tmp1 ); Even some seasoned developers aren't aware of this syntax, so it's perfect.