I'm the developer behind Lily, a statically-typed alternative to PHP. Can I get some feedback, please?

I'd love to write a language. So far I only made notes for myself but unless I get my ass up it's up for everyone to pick their favourite :)

  • Support "secure strings", i.e. for passwords which can be deterministically removed from VM memory (doesn't guarantee to remove entirely from OS/RAM)
  • Everything is an expression and returns a value
  • A "definition of a function" returns a function object
  • Supports closures
  • Native Syntax for Regular Expression (commonly /regexgoeshere/i )
  • Allow not only if/unless but also modifiers, e.g.: "statement if foo"
  • Have simple truethness rules, i.e. everythung not false is true. Numeric 0 is true.
  • "loop...else", i.e. if no loop iteration has been done at all, run the else condition
  • Spaceship operator <=>
  • Allow chained comparison: if 1 < x <= 4
  • Allow opening classes/modules after they're defined (also internal ones) *Block scope variables; i.e. variables defined within a block are not visible from outside (i.e. they do not leak) *Resuming exceptions:

    function foo() { do something throw exception do something else }

    try foo catch Exception echo catched and resume resume end

will output:

do something cathed and resume do something else

  • Sandbox / security features. Allow execution code within application defined constraints (memory, IO, network, etc.)
  • Security: allow objects to be tainted, i.e. "come from unsafe source"
  • Annotations
  • Concept of "symbols" like in Ruby
  • Number literarls: Hex: 0xFF, Oct: 0o23, Binary: 0b1000011, Dec: 231.23
  • Assertions
  • Unicode from start
  • Allow skipping default values when calling functions. I.e.

    def foo(a, b=3,c=3) end


  • Allow DATA blocks e.g. at the end of a source file, which ideally is directly readable from the language (i.e. for binary data)

/r/programming Thread Link - github.com