|
See title
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
This is almost exactly the same question I asked here in the Lounge about 7 years ago. I was struggling with something and it wasn't working as I expected it to and hence the frustration.
@JeremyFalcon gave a really good response to that question and 7 years later I fully agree with him.
Most of the hate JS gets is from people who are new to it, and probably have an expectation of how it would/should work. When it does not (and not always due to a straight forward reason) it gets frustrating.
Historically JS has been riddled with issues. It still is. But over the years most of the major issues with JS are now avoidable when we use it a certain way.
For example, the global namespace pollution has been a major issue causing countless production bugs which can be avoided with the use of JS modules or IFFEs.
The callback hell can be avoided with the use of asynchronous programming.
As people get more experienced with JS they become more accepting of it's quirks and manage to avoid it's pitfalls while being able to produce robust production ready code.
|
|
|
|
|
I think part of it is lingering feelings from way, way back when when every browser had their own implementations of certain features which meant that building any sort of platform that was going to work cross-browser was a major headache.
I remember adopting MooTools because it offered cross-browser AJAX support, then obviously jQuery when it came along with it's own solutions. These days most JS functions are normalised (ie. the fetch API) but there's a lot of salt in the wounds that can't be cleaned so easily.
|
|
|
|
|
I'm learning it just now, new job needs it. My biggest gripe is lack of typing of variables. I would like to know what kind of value, object, etc I can pass into a function.
Okay, I do like that they are called functions rather than methods. Cut my teeth on C and then Delphi (which had both functions and procedures) but it rankled me for the 10+ years I worked in Java that I had to say method.
Javascript does have something akin to function pointers, which is a nice throwback to C.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
MarkTJohnson wrote: My biggest gripe is lack of typing of variables.
Typescript to the rescue
|
|
|
|
|
Erm ... JS has both methods and functions - the former operate on object data (as per C#) the later are procedural and don't (as per C)
The difference in name is important because it tells you what you can do with a bit of code - that's why Java insists on method to differentiate it from the more primitive function you were used to in C.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: that's why Java insists on
Tut tut!
Java ≠ JavaScript.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Quote: ... it rankled me for the 10+ years I worked in Java that I had to say method.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Like I said, learning. Haven't gotten to that stuff yet.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
OriginalGriff wrote: to differentiate it
One thing I disliked about Pascal is that it has Function and Procedure distinguished by keyword -- I prefer that C and its ilk don't, and have no keywords for those concepts.
I can understand why SQL does things more differentlier, and that's OK.
|
|
|
|
|
Wordle 1,089 4/6
⬜🟨⬜⬜🟨
🟨🟩⬜⬜🟨
🟩🟩🟩⬜⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,089 3/6*
⬜🟨⬜⬜🟨
🟨⬜⬜🟩🟩
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 1,089 4/6
⬜⬜⬜🟨🟨
🟩🟩⬜🟨⬜
🟩🟩⬜⬜🟨
🟩🟩🟩🟩🟩
|
|
|
|
|
⬜🟨⬜⬜🟨
⬜⬜⬜⬜⬜
⬜🟩🟨🟩🟨
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 1,089 4/6*
⬛🟨⬛⬛🟨
⬛⬛🟨⬛🟨
⬛🟩🟨🟨⬛
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,089 2/6
🟨⬜🟩🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
(12. Juni 2024) 5/6
⬛⬛⬛🟨⬛
⬛🟩🟨⬛🟩
⬛🟩⬛🟨🟩
🟩🟩⬛⬛🟩
🟩🟩🟩🟩🟩
Rules for the FOSW ![ ^]
MessageBox.Show(!string.IsNullOrWhiteSpace(_signature)
? $"This is my signature:{Environment.NewLine}{_signature}": "404-Signature not found");
|
|
|
|
|
Not playing since a good while but I didn't lose my touch
Wordle 1.089 3/6
🟩⬛⬛⬛⬛
⬛⬛⬛⬛🟨
🟩🟩🟩🟩🟩
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
The shortest horror story: On Error Resume Next
|
|
|
|
|
Wordle 1,089 4/6
⬛⬛⬛⬛⬛
⬛🟨⬛⬛🟨
🟨🟩🟨⬛🟨
🟩🟩🟩🟩🟩
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 1,089 3/6*
⬜⬜🟩🟩🟩
🟨⬜🟩🟩🟩
🟩🟩🟩🟩🟩
Happiness will never come to those who fail to appreciate what they already have. -Anon
And those who were seen dancing were thought to be insane by those who could not hear the music. -Frederick Nietzsche
|
|
|
|
|
Nice resume. Mr Hendrix, but are you experienced?
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Great motivational speaker... really lit a fire under the team.
|
|
|
|
|
I know, it's a groaner. Jimi fan
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Imgflip [^]
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
I'm obviously missing something here
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|