

Introducing agora: a dynamic, embeddable programming language built with Go - PuerkitoBio
http://0value.com/introducing-agora--a-dynamic--embeddable-programming-language-built-with-Go

======
x3ro
This language seems to remove lots (almost all?) of the goodies of Go, like
multiple return values, type checking by the compiler, gofuncs and channels,
slices, maps and enforced naming conventions, and replace them with stuff from
PHP, like interpreting "0" and "nil" as false and weird meta-methods.

~~~
JulianMorrison
Yeah, the senseless differences are deal breakers for me. It seems to be
written by someone who is pining for Java - single returns and exceptions, no
preamble before if, ternary operator, etc.

It would have been simpler to just make "dynamically typed Go".

~~~
PuerkitoBio
That's fine, I know it can't please everyone, but as mentioned in the docs and
the article, this is more about Lua-like semantics with a syntax very close to
Go than Java. There are no exceptions _per se_ , there are runtime errors
returned to the Go host, and a protected mode using `recover()`.

The preamble before `if` is mainly because the variables are function-scoped
anyway, but again, a lot of things may change, this is the very first step in
a long iteration process, and the feedback I'm getting today from the various
forums will help a lot in knowing how to steer the ship.

------
ansible
I was discussing with a friend online about a scripting language for Go that
would integrate as well with it as Lua does with C.

We concluded, however, that the best option would be to write a Go interpreter
(in Go of course). One of the key reasons why is to maintain full
compatibility with Goroutines and channels.

I never got started on that project though... too many others need finishing.
Bravo on publishing your vision!

~~~
PuerkitoBio
Thanks, it's a very early "vision", but I'm happy with the way things are
going!

~~~
ansible
BTW, thanks also for creating 'gocrawl'. We've been trying it out a little
bit, it is working good so far!

~~~
PuerkitoBio
awesome, thanks!

------
mseepgood
Other similar projects:

Otto (JavaScript interpreter):
[https://github.com/robertkrimen/otto](https://github.com/robertkrimen/otto)

Twik (Scheme like): [http://blog.labix.org/2013/07/16/twik-a-tiny-language-
for-go](http://blog.labix.org/2013/07/16/twik-a-tiny-language-for-go)

------
NateDad
Arg, no... please no float as the default(only) numeric type. That's one of
the worst things about javascript.

~~~
tlb
Why do you think that? I find JS's numeric rules (float, except when you use
bitwise operators) quite convenient and safe. Some examples of things that are
awkward with float-only numeric would be helpful.

~~~
millstone
Go's floating point support is sort of FUBAR. For example, these three
equivalent snippets all produce different results:

1\. fmt.Printf("%f", 1.0 / -0.0);

2\. x := -0.0; fmt.Printf("%f", 1.0 / x);

3\. x := 0.0; fmt.Printf("%f", 1.0 / -x);

