Settings

Theme

Lily Programming Language

lily-lang.org

26 points by FascinatedBox 3 days ago · 17 comments

Reader

oneseven 3 hours ago

What I really want to see from a "*-programming-language" post on HN is _why_. Why Lily?

  • keychera an hour ago

    I am curious as well. some past readme has Why sections and I am not sure why they are removed/changed

    this have "Why" section https://gitlab.com/FascinatedBox/lily/-/blob/d3ace2907747106...

    this have "How Lily stands out from other languages:" section https://gitlab.com/FascinatedBox/lily/-/blob/785a88534cced53...

  • andyferris 3 hours ago

    The README on gitlab at least has a sentence or two on that: https://gitlab.com/FascinatedBox/lily

    > An interpreted language with a focus on expressiveness and type safety

    Personally I think typed scripting languages could be the future. They should support AOT compilation where necessary.

    • keyle 2 hours ago

      Why do you think that's the future?

      Isn't a waste to essentially reinterpret an entire program that may be run 5000 times a day?

      AOT compilation, how is that different than make && run?

      At some point, you have a compiled language, if it's quick to compile, you're doing the AOT yourself, the scripting is an illusion. Pun intended.

      • nine_k 2 hours ago

        Isn't it a waste to run a test suite for a program that would run 1M times a day in production?

        The key adjective here is successfully run. You want to detect any errors as early as possible. Ideally even at the early stages of writing the script, when a typechecker is already able to point at certain errors, and thus help avoid missteps in further design.

    • nofriend 2 hours ago

      a statically typed aot compiled scripting language is... not

      • nine_k 2 hours ago

        "Scripting" is a role: an embedded, human-friendly, compact language, also suitable for interactive work / REPL.

        (Laugh all you want, but Haskell has a rather nice REPL, and can work as a scripting language.)

      • LoganDark an hour ago

        Luau gets pretty close to statically typed and AOT compiled now. It's still a scripting language.

        Even C or Rust can be a scripting language. You just integrate the toolchain to your app, same as every other scripting language.

  • paulddraper 3 hours ago

    From the link:

    > Key features of Lily:

    > Built-in template mode

    > Embed/extend in C

    > Single-inheritance classes

    > Exceptions

    > Generics

    > Algebraic data types (with Option and Result predefined).

    • andsoitis 2 hours ago

      That’s what. Not why.

      • nine_k an hour ago

        The why: because Lua, Python, JavaScript, Janet, etc lack many or all these features. And each of these features is known to make life easier for a human programmer.

        • dismalaf 17 minutes ago

          Looking through that list of features, Ruby (the dynamic language I know best) has all but 1 built-in (and the other can be added with Gems). I'm guessing Python probably has them all too (but I don't know Python that well). They're pretty common. So the why still isn't clear.

      • paulddraper 2 hours ago

        The reason it exists is to provide those features when programming computers.

pansa2 an hour ago

> statically-typed

> Embed/extend in C

Is Lily intended to be (or could it be used as) a statically-typed alternative to Lua?

Personally I'm happy with dynamic typing for scripting - but I suspect many people would welcome a statically-typed option, and there don't seem to be many available.

roxolotl an hour ago

I’m a sucker for little embeddable languages but I’m even more of a sucker for rpn. Wonderful little example shows how simple of a math scheme it is.

7e an hour ago

Has anyone yet designed a language with the explicit goal of being cheapest/easiest to use by an AI coding agent?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection