logoalt Hacker News

brabelyesterday at 8:41 PM5 repliesview on HN

> it feels like it departs from what people know without good reasons.

Lua was first released in 1993. I think that it's pretty conventional for the time, though yeah it did not follow Algol syntax but Pascal's and Ada's (which were more popular in Brazil at the time than C, which is why that is the case)!

Ruby, which appeared just 2 years later, departs a lot more, arguably without good reasons either? Perl, which is 5 years older and was very popular at the time, is much more "different" than Lua from what we now consider mainstream.


Replies

rwmjyesterday at 8:59 PM

We had a lot problems embedding Ruby in a multithreaded C program as the garbage collector tries to scan memory between the threads (more details here: https://gitlab.com/nbdkit/nbdkit/-/commit/7364cbaae809b5ffb6... )

Perl, Python, OCaml, Lua and Rust were all fine (Rust wasn't around in 2010 of course).

show 1 reply
rapindyesterday at 11:09 PM

> Ruby, which appeared just 2 years later, departs a lot more, arguably without good reasons either?

I doubt we ever would have heard about Ruby without it's syntax decisions. From my understanding it's entire raison d'être was readability.

show 1 reply
zeckalphayesterday at 10:42 PM

Pascal and Ada are Algol syntaxed relative to most languages.

nurettintoday at 4:30 AM

    def ruby(is)
      it = is 
      a = "bad"
      example()
      begin
        it["had"] = pascal(:like)
      rescue
        flow
      end
    end
a-french-anontoday at 9:41 AM

I don't think you understand his point. Ruby has a different syntax because it presents different/more language features than a very basic C-like language; it's inspired by Lisp/SmallTalk, after all. Lua doesn't but still decided to change its looks a lot, according to him.