Closed pldis closed 5 years ago
I agree with a lot of these concerns. In my opinion, Scarpet should just be an existing language. Gravity would be my favorite choice (it's a very good make-almost-everyone-happy embeddable language) but Javascript, Ruby, Lua, etc. would work fine too.
The conditional and loop syntax where the branches are implicit closures is very strange. Why not just replicate what C-like languages do?
Regarding scarpet being an existing language - it wouldn't follow the principle of being lean. I bet bedrock's js would have more performance bottlenecks resulting from the fact that it is technically executed on a side and interfaces with the API when it needs something, but I may not correct on that one. Plus I find syntax of things like LUA, very limiting, and confusing with programs with more than 5 statements in them.
By looking at the language syntax so far, it strikes me as something very unreadable at some points. Considering that (AFAIK) you wish this language would be embedded in MC, it is not very user friendly. I have some questions and issues that might clarify the design choices.
_
and__
) feel very primitive and limiting, and the namespace for custom functions will be running out quickly (with global functions likeair
orput
). Did you think about namespacing them? What about relying on magic strings vs constants (_ ~ 'sneaking'
vs_ ~ Namespace.sneaking
)?_
"magic variable"... There is a reason magic variables are so rare. They are implicit, confusing and very demanding from a person who reads the code. From what it seems, you are trying to create some kind of Perl-inspired language, but there is a reason why it is pretty much dead nowadays.