Skip to content

isundefined() needed as base of functionality, really really #3565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
applibs opened this issue Oct 29, 2020 · 2 comments
Closed

isundefined() needed as base of functionality, really really #3565

applibs opened this issue Oct 29, 2020 · 2 comments

Comments

@applibs
Copy link

applibs commented Oct 29, 2020

I have seen many contributions on the topic of "undefined variable", very many and I can not believe that this basic logical evaluation of jv Less is not yet. It is in every programming language as a basis as well as bool, number, string, etc.
Please do not discuss this and do it for the developer community, which will be very helpful.
There are too many requests for this to be ignored.

I've spent a huge amount of time bypassing this, and I still don't have the perfect solution. All other workarounds are bad. I used to like Less, but more and more a developers are leaving some similarly restrictive technology because they have to make too many bad workarounds, which are much more expensive than switching to something else and the technology dies.

It is a very small requirement and small modification, but long reach.

Thank you

@matthew-dean
Copy link
Member

Can you explain your use case and why you personally believe it has a long reach that isn't resolved here? #1400

@matthew-dean
Copy link
Member

matthew-dean commented Dec 14, 2020

@applibs On second thought, with some recent changes to function evaluation, a function like this is fairly trivial.

I've added it here and plan to release with 4.0, unless there's any objections.

Note: Less's convention for is functions is to verify if is[thing] is true, therefore it's added as isdefined, rather than isundefined, which is a true of the negative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants