How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
10 plus years* active enterprise development experience and a Fine art degree 🎨
In javascript unlike concise property names (which results in just a regular identifier scope lookup), calling a function often involves doing a lot more.
functionred(){return[255,0,0]}constcolors={red()}
here the javascript VM needs to first resolve the reference to red, it will then need to check if the value is a function or not, it will then need to check if the function object supports regular calls (JavaScript "classes" which are just fancy constructor functions must be called using only new operator), you can see that unlike concise property names there's a lot more nuance involved.
It is doable, but they're going to have to cut a lot of corners.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Implementing that is going to be difficult since you can invoke any expression in javascript.
That's interesting can you give an example of this problem. Thank you for commenting
In javascript unlike concise property names (which results in just a regular identifier scope lookup), calling a function often involves doing a lot more.
here the javascript VM needs to first resolve the reference to
red
, it will then need to check if the value is a function or not, it will then need to check if the function object supports regular calls (JavaScript "classes" which are just fancy constructor functions must be called using onlynew
operator), you can see that unlike concise property names there's a lot more nuance involved.It is doable, but they're going to have to cut a lot of corners.