Show HN: Script: JavaScript That Runs Like Rust

(docs.script-lang.org)

6 points | by jucasoliveira 3 days ago ago

5 comments

  • kermatt 3 days ago ago

    Interesting project, problematic name?

    Searching for answers in the proper context was difficult pre-AI for some language languages (ex. "Go" vs "Golang" [1]), I wonder if search term collision with the word "script" is going to be better or worse with summarized searches.

    [1] The Go language developers at sometime asserted the name was not "Golang", but that produced much better search results.

    • jucasoliveira 2 days ago ago

      That's a valuable feedback, and the answer is I don't really know , it just make sense to name like this when I created it.

      But it's a nascent project, that's plenty of time to think if the name is a good fit or not. I'm always open to change if makes total sense

  • eiiot 2 days ago ago

    Was this post written with AI? The syntax and use of emojis certainly looks like something Claude would generate.

    • jeswin 2 days ago ago

      > Was this post written with AI?

      Why should we care if it's not difficult to read? What is your complaint?

  • jeswin 2 days ago ago

    Very interesting. I made a similar project called tsonic [1] which compiles TS to C# and then uses NativeAOT to compile it down to native code.

    We'd have faced similar issues, and I'm curious how you solved it. From your examples:

      function add(a: number, b: number): number {
        return a + b;
      }
    
    The challenge I faced here with JS/TS was that they have a single "number" type which can be carry ints, longs, floats etc. In most application code, you don't want a and b to be floats - you want them to be integers; such as in a loop counter. There are a whole bunch of types in native code that have no equivalent in TS.

    It took me several months to get to a usable state, working on issues one by one.

    This is a great project. Keep going, good luck.

    [1]: https://tsonic.org