|
|
|
|
|
by skydhash
454 days ago
|
|
Does it really? The thing is that there’s a domain model beneath each kind of library and if they solve the same problem, you will find that they will generally follows the same pattern. Let’s take the web. React, Svelte, Angular, Alpine.js, all have the same problems they’re solving. Binding some kind of state to a template, handling form interactions, decompose the page into “components”,… once you got the gist of that, it’s pretty easy to learn. And if you care about your code being correct, you still have to learn the framework to avoid pitfalls. Same things with 3D engines, audio frameworks, physic engines, math packages,… |
|
So now I want to do a new web application -- If I fall back on my C roots, my Javascript looks a lot like C. Example: adding an item to an array. The C style in Javascript would be to track the length of the array in another variable "len", and do something like myarray[len++] = new_value;
I can feed this into an LLM, or even say "Give me the syntax to add a value to an array", and it gives me "myArray.push(newValue)", which reminds me that "Oh yeah, I'm dealing with a functional/object oriented language, I can do stuff like this". And it reminds me that camelCase is preferred in Javascript. (of course, this isn't the real situation I've run into, just a simplified example -- but I really don't have all the method names memorized for each data type. So in that manner it is useful to get more concise (and proper) code.