Quite promising: clean-looking syntax, little overhead, portability seem to be driving motivations. Especially the following feature could promise adoption and momentum:<p><pre><code> dynamic typing (not a fan myself, but for scripting: OK --- would be great if all such languages had a statically&strong-typed option --- after all the compiler/JIT needs to guess/work much less)
higher order functions and classes
coroutines (via fibers)
closures
garbage collection
operator overriding
powerful embedding api
</code></pre>
Very neat-<i>sounding</i>. Will have to keep watch. Not as low-level as Go (<i>can</i> become wordy!), not as "foreign" initially as Rust (what, no GC, borrowing, a borrow checker, what?), not (yet!) as "haphazard" as... the <i>majority</i> of shell-scripting/server-scripting/client/web-scripting approaches.
For a short moment, I hoped that this was about a revival of one of my favorite non-Turing-computable esoteric programming languages, but I guess that's of pretty low probability!<p>Unfortunately the original spec is long gone, but [1] at least mentions the gist:<p>[1] <a href="https://esolangs.org/wiki/Gravity" rel="nofollow">https://esolangs.org/wiki/Gravity</a>
How does the feature set differ from [Wren][0]? Also, the syntax reminds me a lot of Go.<p>[0]: <a href="https://github.com/munificent/wren" rel="nofollow">https://github.com/munificent/wren</a>
What's the argument for required brackets around if (conditions) and switch (conditions)? To me they seem redundant.<p>--<p>As a side point, I hope switch statements are less like C and more like Rust (Rust happens to have better looking syntax, not just because its Rust):<p><pre><code> match <identifier> {
<val> => {
//
}
..
}
</code></pre>
C-style always creates confusion on how to indent blocks following case statements
Says it supports Functional programming, but I don't really see functional features. Seems premature?<p>I see what the goals of Gravity are, but are there any reasons I want to use it?<p>Side note: not a huge fan of implicit self, i.e. class methods automatically referring to "y" as the instance variable "y". I realize c# and Java do it, but worrying about name elision at all is something I'm not a fan of. From an ergonomics perspective, it makes editor autocomplete features slightly worse, as a prefixed "this" or what have you can give it additional context vs "anything in scope"
Wouldn't this be better served with defaults?<p><pre><code> // constructor
func init (a, b, c) {
if (!a) a = 0;
if (!b) b = 0;
if (!c) c = 0;
x = a; y = b; z = c;
}
</code></pre>
Like<p><pre><code> func init (a=0, b=0, c=0) {
x = a; y = b; z = c;
}</code></pre>
Has anyone tried this CreoLab thing? Any comment?<p>Here's the main use case:
<a href="http://creolabs.com/gravity" rel="nofollow">http://creolabs.com/gravity</a>
This looks like a language designed for use with a commercial product / development environment (<a href="http://creolabs.com/" rel="nofollow">http://creolabs.com/</a>).<p>I'm curious how well that works - I know that <i>used</i> to be fairly common in the '80s and '90s, but it feels like that hasn't been happening much of late. The only very similar examples I can think of are Swift and Xamarin; Swift had the advantage of a large customer base (everyone writing iOS apps), and Xamarin was based on an existing, well-established language (C#). And all the older big examples that come to mind, VB, Delphi, Objective-C, etc., were variants of an existing language (Basic, Pascal, C, respectively), not a brand new language.<p>Creo folks, are you finding that customers / potential customers are excited about picking up the new language? I'd love to live in a world where there's more work on programming languages (clearly, none of our existing languages are optimal) but I'm not super optimistic.
I think the main value of this project is hidden under the "internals" link of the site. It discusses the construction of the language. Although it is incomplete as of now - hopefully the pages get filled up.<p><a href="https://marcobambini.github.io/gravity/internals/" rel="nofollow">https://marcobambini.github.io/gravity/internals/</a>
<i>> Swift-like syntax</i><p>But the example doesn't show any Swift-like syntax... except for `func`. Other than that, this is a dead ringer for Javascript.
I'm totally biased since I love Lua and C, but this language looks great. Really loving what it's putting down.<p>Edit: What's downvote worthy of this comment?
// a represents a range with values 1,2,3
var a = 1...3;<p>// b represents a range with values 1,2
var b = 1..<3;<p>Ah! I wish they had gone for 1..3 and 1>..3 and 1..<3 and 1>..<3 to make it easy to understand. The above would map to [1,2,3], [2,3], [1,2] and [2] respectively.<p>Range operator quirks with ... and .. have to today be memorized and waste developer seconds that add up to man-years.
For those being negative about "yet another programming language," try creating a lang sometime...it's a fantastic exercise and, in the very least, will make you a much better programmer.
Well, they have an excellent 404 page:
<a href="http://creolabs.com/404.html" rel="nofollow">http://creolabs.com/404.html</a>
"built-in JSON serializer/deserializer" near "closures" and
"coroutines (via fibers)" feels a bit.. odd. Sign of the times, I understand, but still.<p>Apart from this boring grumbling, the project is very interesting. Waiting for internals (<a href="https://marcobambini.github.io/gravity/internals/index.html" rel="nofollow">https://marcobambini.github.io/gravity/internals/index.html</a>) to arrive.