Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
 
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		- 
				
				 Froot74578yWait. So someone wrote in a full retard thing that wouldn't run in any language and it's JS's fault? 🤔 Froot74578yWait. So someone wrote in a full retard thing that wouldn't run in any language and it's JS's fault? 🤔
- 
				
				var something = someFunction; // will assign a reference to the function
 
 var something = someFunction(); // will call the function and assign the returned value
- 
				
				 CptFox15788y@Froot to be fair, pretty much any other language would have sounded the alarm. I don't do much JS, but shouldn't linters look for the use of functions without parentheses? I know there are valid use cases for this, but just a quickly dismissable warning seems like it would have solved the problem. CptFox15788y@Froot to be fair, pretty much any other language would have sounded the alarm. I don't do much JS, but shouldn't linters look for the use of functions without parentheses? I know there are valid use cases for this, but just a quickly dismissable warning seems like it would have solved the problem.
- 
				
				 Froot74578y@CptFox Some linters might do that. ESLint and Flow.js are your best bets here I think. But assigning a function reference is a perfectly valid operation that happens all the time. I don't think you can put an alarm on that without annoying a bunch of people. Froot74578y@CptFox Some linters might do that. ESLint and Flow.js are your best bets here I think. But assigning a function reference is a perfectly valid operation that happens all the time. I don't think you can put an alarm on that without annoying a bunch of people.
- 
				
				 CptFox15788y@Froot Yeah I guess so, but one specific assignments are rarer. For example, in CptFox15788y@Froot Yeah I guess so, but one specific assignments are rarer. For example, in
 let a = () =>{}; let b = a;
 I don't see much point in reassigning the function other than to cause confusion, so maybe warnings could be put on reassignment only
- 
				
				 Froot74578y@CptFox Mmmm perhaps. There are cases where your function gets a callback and you assign it somewhere for later use. This would probably also trigger on those 🤔 Froot74578y@CptFox Mmmm perhaps. There are cases where your function gets a callback and you assign it somewhere for later use. This would probably also trigger on those 🤔





 This never gets old...
This never gets old...
 Exactly
Exactly
 ¯\_(ツ)_/¯
¯\_(ツ)_/¯
Wtf JS.
It take two days that root of the problem is two char - "()".
Someone write isManageExp instead isManageExp()
maybe im too dumb about this fuckin js thing.
I go around all file to make sure the ouput is correct.
Damn js, damn damn
undefined
knockoutjs
javascript
wft js
im dumb