Juxtaposition as an operator is already used by function invocation, e.g. f "Hello" If f were a string, how would I know I wanted to concat it instead of calling?
If I ever write JavaScript, then I definitely use JSHint. It doesn't help with some things such as immutable local bindings, type checking, not having to worry about hoisting, or any of the nice syntax features you get…
I feel it pretty much holds true when you try to compile any language that was designed without JavaScript in mind into JavaScript, the result is likely to be ugly and/or imperformant. (Not always, e.g. asm.js)…
Dart reinvents a full type system for itself, with its own environment and paradigms, and if you want to cross-compile to JavaScript instead of running in a dart VM, you have to ship a huge swath of code with it to get…
That could be possible, you could even do it today, if you wanted: macro operator binary ^$ ASTE $left bitxor $right There are also operators for `and`, `or`, `xor` which act logically. `not` which does a boolean…
Yes, I take a lot of inspiration (with some leeway for personal taste) from Delphi and C#, so I have great respect for Anders Hejlsberg - who I'm now competing with since TypeScript.
Actually, here's a better example, if you want defaults. Also nice is that it doesn't have to create a full defaults object at runtime, and each binding would only be evaluated if individually needed: let…
I'm very happy you're excited about it. The best thing you could do for me now is to use GorillaScript to make something. Anything. Something big, something small, something with fancy features or minimal ones. I want…
Currently, no. I do plan on adding warnings (not errors) on a statically-calculated type issue. One thing is that I don't plan on it erroring if you call a function with a value whose type might be an "any" type or a…
I thought about it, but for the most part I used `~` as a way of referring to something in an unstrict way, e.g. `~+` doesn't typecheck, it just adds and auto-coerces both operands to a number. I didn't want to have `~`…
Yeah, I hung out there. Also contributed a bit. No, most of my macro ideas come from Scheme.
Yeah, class Child extends Parent
They have made serious effort with developer tooling, especially with Source Maps.
I never claimed for GorillaScript to be a C-like language, because at its core, stripped of syntax, JavaScript is not a C-like language. It more resembles LISP with its macros and closures with nice syntax built around…
Most of the time, string concatenation is unnecessary with interpolation: "$alpha $bravo" means alpha & " " & bravo. The reason `and` and `or` are best in parenthesized groups is that it creates confusion in the…
Interesting work. Once I refactored GorillaScript to be pretty much fully macro-driven, it made everything super-nice to deal with. Every single syntax construct in GorillaScript is a macro, even `if` and all that stuff.
and= isn't all that useful, I agree, but it would be odd to leave out given that there's or=, ?=, ownsor=, etc. \alpha-bravo-charlie == "alphaBravoCharlie" Well, since GorillaScript doesn't require parentheses for…
GorillaScript has full support for Source Maps, as any good compile-to-JS language should.
Yeah, I stepped away from the Lua world to work on JavaScript-related stuff.
In production code, using & for string concat is pretty atypical, since you can use string interpolation: "$(alpha)$(bravo)"
Yes, you would, at least in the current state of things. I do plan on adding some compile-time checking (without getting in the way), but it's not there yet.
For named parameters, this is the best one can do in JavaScript without constructing a fully static type analyzer: let use-named({ name, age }) -> use-named(name: "ckknight", age: 25) For refinements, what are you…
type-checking and such features can be easily disabled by sticking const DISABLE_TYPE_CHECKING = true at the top of your file. It's handy to have in development vs. production.
Types are allowed to be any of the primitive types (e.g. Boolean, Number, etc.), null, undefined, any custom "class", a specifically-typed array (e.g. [Number] for an array of numbers), or a specifically-typed object…
If anyone would like to look at the slides for a presentation I did on GorillaScript, here you go: http://ckknight.github.io/gorillascript-presentation/ In it, I discuss some of the design decisions. Sadly, there wasn't…
Juxtaposition as an operator is already used by function invocation, e.g. f "Hello" If f were a string, how would I know I wanted to concat it instead of calling?
If I ever write JavaScript, then I definitely use JSHint. It doesn't help with some things such as immutable local bindings, type checking, not having to worry about hoisting, or any of the nice syntax features you get…
I feel it pretty much holds true when you try to compile any language that was designed without JavaScript in mind into JavaScript, the result is likely to be ugly and/or imperformant. (Not always, e.g. asm.js)…
Dart reinvents a full type system for itself, with its own environment and paradigms, and if you want to cross-compile to JavaScript instead of running in a dart VM, you have to ship a huge swath of code with it to get…
That could be possible, you could even do it today, if you wanted: macro operator binary ^$ ASTE $left bitxor $right There are also operators for `and`, `or`, `xor` which act logically. `not` which does a boolean…
Yes, I take a lot of inspiration (with some leeway for personal taste) from Delphi and C#, so I have great respect for Anders Hejlsberg - who I'm now competing with since TypeScript.
Actually, here's a better example, if you want defaults. Also nice is that it doesn't have to create a full defaults object at runtime, and each binding would only be evaluated if individually needed: let…
I'm very happy you're excited about it. The best thing you could do for me now is to use GorillaScript to make something. Anything. Something big, something small, something with fancy features or minimal ones. I want…
Currently, no. I do plan on adding warnings (not errors) on a statically-calculated type issue. One thing is that I don't plan on it erroring if you call a function with a value whose type might be an "any" type or a…
I thought about it, but for the most part I used `~` as a way of referring to something in an unstrict way, e.g. `~+` doesn't typecheck, it just adds and auto-coerces both operands to a number. I didn't want to have `~`…
Yeah, I hung out there. Also contributed a bit. No, most of my macro ideas come from Scheme.
Yeah, class Child extends Parent
They have made serious effort with developer tooling, especially with Source Maps.
I never claimed for GorillaScript to be a C-like language, because at its core, stripped of syntax, JavaScript is not a C-like language. It more resembles LISP with its macros and closures with nice syntax built around…
Most of the time, string concatenation is unnecessary with interpolation: "$alpha $bravo" means alpha & " " & bravo. The reason `and` and `or` are best in parenthesized groups is that it creates confusion in the…
Interesting work. Once I refactored GorillaScript to be pretty much fully macro-driven, it made everything super-nice to deal with. Every single syntax construct in GorillaScript is a macro, even `if` and all that stuff.
and= isn't all that useful, I agree, but it would be odd to leave out given that there's or=, ?=, ownsor=, etc. \alpha-bravo-charlie == "alphaBravoCharlie" Well, since GorillaScript doesn't require parentheses for…
GorillaScript has full support for Source Maps, as any good compile-to-JS language should.
Yeah, I stepped away from the Lua world to work on JavaScript-related stuff.
In production code, using & for string concat is pretty atypical, since you can use string interpolation: "$(alpha)$(bravo)"
Yes, you would, at least in the current state of things. I do plan on adding some compile-time checking (without getting in the way), but it's not there yet.
For named parameters, this is the best one can do in JavaScript without constructing a fully static type analyzer: let use-named({ name, age }) -> use-named(name: "ckknight", age: 25) For refinements, what are you…
type-checking and such features can be easily disabled by sticking const DISABLE_TYPE_CHECKING = true at the top of your file. It's handy to have in development vs. production.
Types are allowed to be any of the primitive types (e.g. Boolean, Number, etc.), null, undefined, any custom "class", a specifically-typed array (e.g. [Number] for an array of numbers), or a specifically-typed object…
If anyone would like to look at the slides for a presentation I did on GorillaScript, here you go: http://ckknight.github.io/gorillascript-presentation/ In it, I discuss some of the design decisions. Sadly, there wasn't…