Why JavaScript is Insane. Reason 26
-
6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.
cheers Chris Maunder
In my experience people don't learn JavaScript. They copy-paste random code until it magically starts working, then refactor everything into a gazillion functions and plaster unit-tests all over it. Once they realize they've written too much code and have too many dependencies, they call it a framework. ¯\_(ツ)_/¯
-
6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.
cheers Chris Maunder
Your question almost seems to assume that those writing JS are "learning it at school or college". My impression is there is a lot of blind use of "other" code, that is misunderstood, then f*rked, patched, etc. Exactly what is going on in every new crypto-currency.
"(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal
-
I am glad I use C!
-
I grad I'm NOT using C or C++. The day of manual memory management, its so flexible, so archaic, its such a dinosaur. I have to go back to it once in a while when developing IoT stuff, but other than that, I'm happy with C# and even JS.
So called 'garbage collection'. That is why apps these days are so bloated. Managing the memory yourself means you only use what you need, when you need it. It really is very simple.
-
6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.
cheers Chris Maunder
-
So called 'garbage collection'. That is why apps these days are so bloated. Managing the memory yourself means you only use what you need, when you need it. It really is very simple.
-
And so called "Memory Leaks" creep up on self managed memory allocation sometime blue-screened the entire app. Or are we so perfect that it will never happens? ;)
Why would memory leak? You free memory when you have done with it.
-
6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.
cheers Chris Maunder
-
where are the other 25 reasons ? curious to read those too. :)
[JavaScript reference - JavaScript | MDN](https://developer.mozilla.org/bm/docs/Web/JavaScript/Reference)
-
6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.
cheers Chris Maunder
-
6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.
cheers Chris Maunder
JavaScript is such a mess that in the past few months while writing some code that should have been simple, loading configuration before starting listening for user requests, I caught myself thinking that what I was doing would have been trivial if I was writing it in C. Add a decent HTTP library or *cgi server and the rest of it wouldn't have been too difficult either. I'm pretty convinced that no one who says anything good about JavaScript has ever even tried to read the ECMAScript specification.
-
6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.
cheers Chris Maunder