-
Notifications
You must be signed in to change notification settings - Fork 0
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
Write grammar to allow dictation and simplify lookup of info #2
Comments
Use "invoke" when invoking a method; whereas, "dot" can be used for accessing fields or invoking. Use "using" to allow multiple consecutive statements with the same variable. For example, "using account invoke set type to checking then set balance to 17 15". Depending on parameter types, could wrap, such as in BigDecimal.
In this case, since method chaining isn't possible (based on return type), would create two statements that interact with the same variable. Could then say "invoke set name to my checking account". Since said "using account", would know to invoke on account.
|
Sounds like instead of "using", should use "with", which is what Kotlin calls it. Instead, "using" should be a try-with-resources, like C# defines it. |
Can use "declare" to create new local variable. What should be used to start initializer? "Equals"? For example, "declare int line number equals 1" to "declare line number as int equals 1" Use "assign" to change the value of an existing variable. "For example, "assign line number equals / to 2"
|
Ability to "select" so can select something to change it or to show Javadoc. Ideally would work on anything in view, but could also limit to current line and expand. |
For "for each loop", don't need to specify if using generics since can determine. If not using generics, type would be Object, just like Eclipse would do. Also, starting in Java 10 could also use var instead of specifying the type |
Chain methods, such as stream, using "then".
For example, "stream accounts then map to string then collect to list".
The goal is to use a simple grammar and focus on code practices to simplify code.
For example, although the following is valid code, it's not the most readable (and would be hard to dictate or describe)
Instead, it's easier to read and dictate the code by breaking it up into variables and passing the variables.
The text was updated successfully, but these errors were encountered: