Hacker News new | ask | show | jobs
by nojvek 1862 days ago
I am so used to C inspired syntax with curlies that this seems a bit foreign to me.

Java, javascript, php, C, C++, C#, Typescript, Rust, golang, Python

I found it fairly easy to pickup syntax since they had many similarities with each other. How to represent functions, assignments, if/for/while seems quite consistent.

I found Arturo quite hard to grasp and make sense of.

2 comments

I totally understand what you mean.

However - and not because I'm the author of the language - once you get the general idea of Arturo (or any of the languages of the Rebol family: be it Rebol, Red, or Arturo), I assure you that you will find it very tempting not to ever go back to the C-inspired languages.

If I could sum up the whole (not-so-)syntax of Arturo, I would say that every "command" takes takes the necessary parameters on its right. And that's pretty much it.

print 10 ; that's a valid function call for example

or

print add 1 2 ; that's also a valid function call (or 2, to be precise)

and...

a: 1 + 2 ; that's how you "assign" meaning to a symbol

other than these super-basics, having a look into the library is pretty much all you'll need in order to get started.

I guess this isn't that difficult. :)

P.S. Feel free to ask any question you want. Feedback and input of any kind is more than welcome too. Also, our Discord channel is fairly active, so... I would even invite you there, so that we could actually exchange ideas about it in a more... interactive way.

Well, perhaps it does take some getting used to, but as soon as you appreciate its simplicity, you'll most likely love it. Former REBOL addict speaking. Have a look at this QuickSort implementation -> https://arturo-lang.io/playground?example=sorting%20algorith...

I would call this rather sweet.