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
-
Id? null
id? null
ID? null
Identifier? null
identifier!
The joys of crappy languages like JS ^^ -
@melezorus34 no. You didn’t get the point.
Needing to try out names of variables and functions to see if you picked the correct one is a con.
Ideally, you want your IDE or compiler tell you immediately that this doesn’t exist and suggest the correct name.
So that you don’t need to execute the whole code. -
@Lensflare then your intrepreter or ide suck bro.
intrepreter:
Map.prototype.has(id) exists
<prop> in <object> exists
Is it a global?
<var> in globalThis exists
IDEs:
JSDOC exists
TS exists
Even the small auto complete helps eith reducing typos -
@melezorus34 yes, TS helps. And is exactly my point.
But I wanted to make a general argument about dynamic languages like JS (or python maybe) where you have those issues.
Related Rants
Same days you just need a duck.
Me: map.get(record.Id)
Code: null
Me: no, map.get(record.id)
Code: null
Me: let's grab this record from the map
Code: null
Me: what the flying fuck, take this fucking ID from this fucking RECORD and find it in THIS god forsaken map.
Code: null
Me:.......
Code: 😉
Duck: did it occur to you the ID exists only AFTER the map is created.
Me: you fucking wha..... oh I'm a dick head.
rant
i need more coffee
devduck
it's good to have a duck
god save the duck