Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Announcing WheelJS - The Future of JavaScript
Adam Nathaniel Davis
Adam Nathaniel Davis

Posted on • Edited on

     

Announcing WheelJS - The Future of JavaScript

My loyal readers (both of them) probably see me as a bit of a tech curmudgeon - railing against everything I don't like, while rarely contributing anything positive to the community. ButTODAY that all comes to an end.TODAY I'm releasing a major open source JavaScript framework that I honestly believe will change the way that weall code.TODAY I release (drum roll, please)...

WheelJS

It's a lot easier toshow you what WheelJS is, rather than trying totell you. So let's just dive into some code samples:

// setting variablesconstcurrentYear=()=>2020;constfavoriteFood=()=>'ice cream';constmyData=()=>{foo:'bar',john:'doe};const weekdays = () => ['Monday','Tuesday','Wednesday','Thursday','Friday'];
Enter fullscreen modeExit fullscreen mode

Are you excited yet? I'mpretty sure you're excited. I can "feel" it.

You've probably noticed thateverything is a function. In WheelJS, there are no scalar values. No objects. No arrays. There are just functions. If we need, say, a string, then we write a function that returns a string.

This is clearly and obviously superior to antiquated JavaScript. JavaScript is supposed to be afunctional language, right? And yet, this so-called "functional language" allows you to define variablescompletely free of functions. If I didn't know any better, I'd swear that all this "functional programming" babble is just some kinda counter-intelligence disinformation campaign. But WheelJS fixes all that insanity.

You're welcome.

Let's look at a few of WheelJS's basic operators:

// additionconstnumber1=()=>19;constnumber2=()=>12;constnumber3=()=>1;constsum=add(number1,number2,number3);console.log(sum)// outputs 32 (19 + 12 + 1)
Enter fullscreen modeExit fullscreen mode

WheelJS'sadd() function accepts two-to-many arguments, but each of those arguments must be a function. In fact, in WheelJS:

Every argument, to every function, must itself be a function. You're allowed toreturn any data type you choose. But if you ensure that all of yourreturn types are ALSO functions...?? Well then, we'll invite you to speak at the next coding conference, where we'll record a mind-numbing 2.5-hour video of you explaining the process to an awkwardly-silent crowd.

// divisionconstnumber1=()=>23;constnumber2=()=>0;constresult=divide(number1,number2);console.log(result);// outputs 42 (23 / 0)// Yes!  You read that correctly!// WheelJS CAN divide by zero!
Enter fullscreen modeExit fullscreen mode

WheelJS'sdivide() function accepts two-to-many arguments, with the first argument being divided by the second, which is in-turn divided by the third, etc.

For everything that you can do with nasty-ol' JavaScript, there's an equivalent way to do it in WheelJS. Except... it's notreally equivalent. Because it'sbetter!

For example, with WheelJS, we don't usefetch(). We usepirate().pirate() is superior, first because it only accepts functions as arguments, and second because it discards all that icky CORS overhead that gives developers so many headaches. Do you want to re-create Amazon? But you don't have millions of dollars in venture capital and years to spend in the grueling work of actuallybuilding a company? Then just usepirate()!

WheelJS is completely incompatible with, quite literally,every other JavaScript package ever written or distributed. That's right. I've just freed you from ever having to worry again about NPM, Yarn, Bowser, Babel, React, Angular -ALL OF IT.

No more hunting down circular dependencies. No more chasing security patches pertaining to obscure packages. No more worrying about when your favorite library might force a migration to Hooks. No more fiddling with Webpack configs. No more of...any of it. Now you are free to write your code exclusively in The Next Great Programming Paradigm - WheelJS.

You're welcome.

FAQ

There's really too much here to absorb in one post. So it might be helpful to cover some of the most common questions:

Is WheelJS performant?

I did a JSPerf this morning comparing WheelJS'sadd() function to JavaScript's inferior+ operator. Over several billion operations, WheelJS was the clear winner - bydozens of microseconds. I'll get around to posting those results pretty soon, but you're not gonna be "that guy", are you? Surely you're not going to hang onto yourdying JavaScript until the full performance results are posted??

Where can I find more documentation for WheelJS?

WheelJS uses a revolutionary, in-browser, run-time documentation system. Open the "developer tools" in your favorite browser, navigate to the "Console", and type:console.log(). That's it! You can put damn-near anything you want into that function (Look! Anotherfunction!!) and it will tell you everything you need to know.

You said that WheelJS is incompatible with Jest (or any other package, for that matter). So what should I use to write unit/integration tests?

Testing is for people who write crappy code. Don't be one of those people. Besides, WheelJS intuitively helps you write better, cleaner, more-bug-free code. If you're using WheelJS and you'restill finding bugs in your code, you might want to seriously consider a fulfilling career as a business analyst.

I installed WheelJS, but I couldn't find any core function that would allow me to create aclass. How can I do that with WheelJS?

Did you not read all the times that we talked aboutfunctions? How many times do we have to spell it out for you? Are you even paying attention? Classes are stooopid. Functions are awesome. Are you stooopid? Do youwant to be stooopid? (Jeez... What'swrong with you??)

Our team makes heavy use of TypeScript. How can I ensure type-safety in WheelJS?

Great question! (And also kinda stooopid - because you really weren't paying much attention to the examples above.) There isone data type in WheelJS - theFUNCTION! That's reallyall you need. Sure... those functions can, maybe, theoretically,return other types of data. But why would you want to do that?? Just makeeverything a function - and then you don't need to worry at all about any of that complicated "type-safety" garbage.

I'm excited about WheelJS, but the other people on my team are very skeptical and they don't want to use it. What should I do?

This kind of question can only come from ajunior developer - because those of us who've been around a while already know the answer. You mustSHAME THEM into compliance. Tech innovation has only ever happened one way: Once you get excited about a potential technology, you have to talk down to anyone who doesn't agree with you. Fill the Slack channel with blog articles that support your current obsession. Any time anyone so-much-asmentions any other approach, chuckle dismissively under your breath. Look at their code and make passive-aggressive comments like, "Ohhhh... You're styling codinglike that?" Bombard them with far-flung edge cases that somehow "prove" that your opinion is superior. If all else fails, there's nothing wrong with some good ol' fashioned bullying. Anything's conscionable if it ultimately serves the higher goal of bringing a superior technology onboard - a technology... like WheelJS.

Is WheelJS stable? How active is the repo?

In some respects, I've been working on WheelJS for my whole life. But rest assured, that I'm still updating it on a daily basis. With continuous integration, I typically deploy at least twice per day. Those deployments are reasonably, umm... "stable" - for at least an hour or two - until some annoying "security researcher" sends out some stooopid alert about some supposed, possible, alleged "critical vulnerability" in the latest release. (I have it on good authority that some of these so-called "security researchers" are, in fact, members of the core React team. I even suspect - although I can't yet prove it - that many of these bogus WheelJS "critical vulnerability" reports originate directly from Dan Abramov.) On good days, I can threaten enough of them, fast enough, that they shut up and let the development rest for a little while. On bad days, I can sometimes be forced to release patches several times per hour.

But wait... Whereis the WheelJS repo??

WheelJS utilizes a first-of-its-kindrecursive deployment strategy. This means that, to install WheelJS, you just need to start froman existing WheelJS implementation and run this line of codewheelJs(). You can run that fromwithin a JavaScript file, or directly from the command line. You can even embed it in the query string of any file served overlocalhost. Or you can say it three times, while clicking your heels. Assuming that the current machine already has an active WheelJS installation in place, this command will, in fact, install the code as a service.

If WheelJS just allows me to do all the same stuffthat I could already do in core JavaScript, then why would I install an entirely new package just to do the same thing?

You really haven't been payingany attention to JavaScript over the last 15-or-so years,have you???

Top comments(19)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
bytebodger profile image
Adam Nathaniel Davis
React acolyte, jack-of-all-(programming)trades, full-stack developer
  • Email
  • Location
    New Orleans, LA
  • Work
    Frontend Software Engineer
  • Joined

You, sir, have just been accepted as a contributing member of the WheelJS core team! Please let me know when you have the package installed locally so you can begin active development.

CollapseExpand
 
khrome83 profile image
Zane Milakovic
  • Email
  • Location
    Austin, TX
  • Education
    Master's Degree, Information Communication Technology
  • Joined

Omg... this is the best thing ever since no code.

Thank you for this gift of the gods.

Do you support two way data binging?

When will you be introducing hooks?

Can I use WheelJS to hydrate every component on my page, even those that are not on that page?

What should I use for state management?

Is my bundle size larger or smaller with WheelJS?

Can I use closures?

CollapseExpand
 
bytebodger profile image
Adam Nathaniel Davis
React acolyte, jack-of-all-(programming)trades, full-stack developer
  • Email
  • Location
    New Orleans, LA
  • Work
    Frontend Software Engineer
  • Joined
• Edited on• Edited

And BTW, I know it'sprobably a typo, but if we tweak it just abit further, I really kinda like the idea of a language that supports two-way dataBINGEING! Like, I set up this listener on this variable... and then IBINGE on all the data!!!

CollapseExpand
 
khrome83 profile image
Zane Milakovic
  • Email
  • Location
    Austin, TX
  • Education
    Master's Degree, Information Communication Technology
  • Joined

Totally a mistake, but amazing.

CollapseExpand
 
bytebodger profile image
Adam Nathaniel Davis
React acolyte, jack-of-all-(programming)trades, full-stack developer
  • Email
  • Location
    New Orleans, LA
  • Work
    Frontend Software Engineer
  • Joined

WheelJS supportsALL THE THINGS!!! (Unless that "thing" is aclass. Cuz we all know that classes are just... stooopid.)

CollapseExpand
 
offirmo profile image
Offirmo
👨‍💻 Senior Fullstack Developer💛 all things JS and 💙 TS🆕 Creator of ⚔️ RPG browser games: 🔗 bit.ly/theboringrpg🆓 Open-source writer & contributor
  • Location
    Australia
  • Work
    Team Lead
  • Joined

??? shouldn't the result also be a function?

Should be:console.log(result())

Also it's missing monads, not functional enough!

How about:
add(number1.or(zero), number2.or(zero)).or(forty_two);

I'd also suggest a standard library for ease of use:

const zero = () => 0...const forty_two = () => 42
Enter fullscreen modeExit fullscreen mode
CollapseExpand
 
bytebodger profile image
Adam Nathaniel Davis
React acolyte, jack-of-all-(programming)trades, full-stack developer
  • Email
  • Location
    New Orleans, LA
  • Work
    Frontend Software Engineer
  • Joined

Congratulations! You have just been added to the core team!

CollapseExpand
 
offirmo profile image
Offirmo
👨‍💻 Senior Fullstack Developer💛 all things JS and 💙 TS🆕 Creator of ⚔️ RPG browser games: 🔗 bit.ly/theboringrpg🆓 Open-source writer & contributor
  • Location
    Australia
  • Work
    Team Lead
  • Joined

Yeah!!! My dream came true 🤣🤣🤣

CollapseExpand
 
talha131 profile image
Talha Mansoor
I am a polyglot seasoned software engineer. Besides the day job, I contribute to open source projects, beta test startup products, and offer consultancy.

WheelJS is the framework we deserve, but not the one we need right now. OrWheelJS is the framework we need, but not the one we deserve right now. Not sure which one is it, still, I am going to migrate my all existing projects toWheelJS right away.

CollapseExpand
 
gadreash profile image
gadreash
  • Location
    GA, USA
  • Joined

Lol, this went from interesting to "wait a minute, wtf"? to enlightenment!!!
Good stuff sir, hope I can make it to the core team some day :)

CollapseExpand
 
thepeoplesbourgeois profile image
Josh
I take words, and build things out of them. I also gay all the things.
  • Location
    San Francisco
  • Education
    life on The Streets. (... no, I didn't really have that.)
  • Work
    Web architect at a desk
  • Joined

😐

✋😐 Your framework isn't fully adherent to its own rules.sum is a scalar, not a function

CollapseExpand
 
bytebodger profile image
Adam Nathaniel Davis
React acolyte, jack-of-all-(programming)trades, full-stack developer
  • Email
  • Location
    New Orleans, LA
  • Work
    Frontend Software Engineer
  • Joined

WheelJS can't be bothered with silly little "rules".

CollapseExpand
 
bykof profile image
Michael Bykovski
  • Location
    Wiesbaden, Germany
  • Work
    Software Developer at AOE GmbH
  • Joined

This totally reflects the programming language: Go

CollapseExpand
 
macsikora profile image
Pragmatic Maciej
I am Software Developer, currently interested in static type languages (TypeScript, Elm, ReScript) mostly in the frontend land, but working actively in Python also. I am available for mentoring.
  • Email
  • Location
    Lublin
  • Education
    M.Sc. Lublin University of Technology
  • Work
    Developer at DataArt
  • Joined

You have for sure writing gift. Nice satire 👍, enjoyed the way you change the tone from explanation to persuasion and to just "you use it or you are dump" 😆 .

CollapseExpand
 
jnario profile image
Jose Nario
  • Joined

This is simultaneously hilarious and deeply depressing.

CollapseExpand
 
bytebodger profile image
Adam Nathaniel Davis
React acolyte, jack-of-all-(programming)trades, full-stack developer
  • Email
  • Location
    New Orleans, LA
  • Work
    Frontend Software Engineer
  • Joined

This is the greatest compliment - and the most accurate feedback - that anyone could've possibly provided on this article.

 
gledros profile image
Gledros
  • Email
  • Location
    Culiacan, Sinaloa, MEX.
  • Education
    Computer Systems Engineer
  • Work
    Software Engineer at Self-Employed
  • Joined

😂😂😂😂😂 HAHAHAHAHAHAH, lol, really mate?

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

React acolyte, jack-of-all-(programming)trades, full-stack developer
  • Location
    New Orleans, LA
  • Work
    Frontend Software Engineer
  • Joined

More fromAdam Nathaniel Davis

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp