Allow lowercase variables and reserve future keywords #2833
Vurv78
started this conversation in
Suggestions
Replies: 4 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Can't have |
Beta Was this translation helpful? Give feedback.
1 reply
-
#3201 will add a warning if any of these are used as an identifier. Hope the impl is alright :P |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been pushing modern E2's syntax to get closer to typescript/javascript so learning E2 is easier and more educational for people wanting to use E2 as a step before moving on to a real world language
The syntax has gotten to a point where it's pretty much identical minus E2 having some extra features. Last things that need to be done are this, #2867 and #2771.
Before doing this, need to create a list of keywords to reserve for the future though, here's my proposed keywords
Variables
static
super
self
true
false
mut
var
null
undefined
Structures
abstract
class
struct
enum
union
extends
implements
instanceof
new
constructor
type
interface
Macros
macro
Looping
in
of
Exceptions
throw
throws
finally
Modules
mod
import
namespace
export
public
private
pub
priv
package
use
Generators / Async
await
async
(should be done implicitly)generator
gen
coroutine
yield
Misc
match
as
typeof
Feel free to comment below any other keywords you think should be reserved. More is better, we can always just remove them later on if it's agreed that we won't implement the actual functionality.
Beta Was this translation helpful? Give feedback.
All reactions