-
Notifications
You must be signed in to change notification settings - Fork 201
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
Expose app
global variable
#6058
Comments
I like the idea of exposing the app as a global (it's basically a sugar for
|
My thinking was it could be a variable name instead of a dedicated keyword. So you can still use the name for other purposes, e.g.
Gotcha. I couldn't think off the top of my head how they'd be different, but we can let the idea bake and maybe something will come to light. Ultimately I think if we can simplify things it can be a good thing |
Not sure it's super healthy for something like this to have double meanings. It's like you wouldn't want to be able to shadow Maybe we can all it |
What about |
+1 for getting rid of |
Maybe |
Hi, This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Congrats! 🚀 This was released in Wing 0.84.3. |
Use Case
I've been thinking about this more, and I'm starting to feel like maybe it could make sense to expose
app
as a global variable as a substitute forthis
(added in #5594). Here's a design sketch:app
can also be available in module files, but it would need a few restrictions (see below). It could be emitted in JavaScript asApp.of(this)
.The motivation is a few-folded:
IConstruct
, but it would be more useful to have access to app-related facilities, like the compilation platform. Supporting boththis
andapp
might be more confusing though (not sure)Proposed Solution
No response
Implementation Notes
No response
Component
Language Design
Community Notes
The text was updated successfully, but these errors were encountered: