rokucommunity / rokucommunity/brighterscript
use `new` syntax for `CreateObject` calls
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
Support using the new keyword as shorthand for CreateObject things. For example, this:
newXfer = CreateObject("roUrlTransfer")
would become this:
newXfer = new RoUrlTransfer()
This would obviously prevent you from creating classes with the same name as all the CreateObject things, but I don't think that would be a big deal since most of them are prefixed with "ro" anyway.
This would also need to support passing in constructor arguments, which would become the arguments to CreateObject.
This would require building a complete list of valid strings for CreateObject, and then we could also validate the constructor arguments.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the parser and semantic handling for CreateObject and the validation of its string names. Then determine how constructor arguments and name collisions should interact with the proposed new syntax. Done means the syntax, complete CreateObject name list, and constructor-argument validation are specified and covered by compiler tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100