One of the bullet points is "Abstract data types (with `Option` and `Result` predefined)." I wonder if they mean "Algebraic data type", since I have seen Option/Result before as an example of those, and they're both commonly abbreviated ADTs. Or maybe they're trying to get at a concept I'm missing here?
Lily: An interpreted language with a focus on expressiveness and type safety
31–40 of 55 posts
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#32Maybe off topic, but I do a lot of ad-hoc python scripts where I drop scripts everywhere in my filesystem, but I need dependencies installed in a virtualenv so my ad-hoc scripts can access them. The problem I'm having is that sometimes things will run for a whole day and then fail at the end because of a typo or something. I've been looking at other languages to see if there's a language like python but type checked,…
One advantage of Lily not mentioned (with regard to typing), is that the type-checking is very fast. One of the reasons I made Lily interpreted and homebrewed all the parts was because as much as I like static typing, it's often slow. Slow static typing, I think, diminishes some of the value of it since you're still waiting but in a different way.
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#33I read the first example of Lily on the site. I found nothing offensive in the language at all - in fact there's a lot to like particularly the readability. Side rant. Unfortunate I can't get past the decision to use exception handling to deal with non-existing keys in map. I'm of the exception-disliking school which is thankfully growing but I guess not yet universal. For me using an exception to indicate the lack o…
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#34Maybe off topic, but I do a lot of ad-hoc python scripts where I drop scripts everywhere in my filesystem, but I need dependencies installed in a virtualenv so my ad-hoc scripts can access them. The problem I'm having is that sometimes things will run for a whole day and then fail at the end because of a typo or something. I've been looking at other languages to see if there's a language like python but type checked,…
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#35Maybe off topic, but I do a lot of ad-hoc python scripts where I drop scripts everywhere in my filesystem, but I need dependencies installed in a virtualenv so my ad-hoc scripts can access them. The problem I'm having is that sometimes things will run for a whole day and then fail at the end because of a typo or something. I've been looking at other languages to see if there's a language like python but type checked,…
It was weird for me at first, but actually Rust provides a great solution here. With https://github.com/DanielKeep/cargo-script you can have single file Rust "scripts" with ecosystem dependencies. When executing the file (via the cargo-script wrapper), dependencies are fetched and a binary is compiled on demand (and cached for re-runs). It's pretty awesome for scripts where type safety is important. #!/usr/bin/env ru…
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#36I read the first example of Lily on the site. I found nothing offensive in the language at all - in fact there's a lot to like particularly the readability. Side rant. Unfortunate I can't get past the decision to use exception handling to deal with non-existing keys in map. I'm of the exception-disliking school which is thankfully growing but I guess not yet universal. For me using an exception to indicate the lack o…
If you want the Option behavior, there's .get()
Anyways, very cool looking language.
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#37I'd just call this GC where it's rc + (presumably) a tracing GC.
> .reject(|r| r.is_space() )
This is nice. I've always found "filter" to be a confusing name. Filter in? Filter out?
'reject' is a very clear name - if it is a space, reject it.
Code looks really reasonable.
I find `: {` to be a strange idiom. Why not one or the other? Seems to distinguish between single vs multiline? I guess that's reasonable. A bit noisy.
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#38> Lily uses reference counting for memory management with garbage collection as a fallback. I'd just call this GC where it's rc + (presumably) a tracing GC. > .reject(|r| r.is_space() ) This is nice. I've always found "filter" to be a confusing name. Filter in? Filter out? 'reject' is a very clear name - if it is a space, reject it. Code looks really reasonable. I find `: {` to be a strange idiom. Why not one or the…
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#39Earlier quoted context omitted.
Well, for good or for bad, python does the same.
To be fair, there's utility to avoid it: check first or do a .get(). That helps you be expressive about what you think should/should not exist
Re: Lily: An interpreted language with a focus on expressiveness and type safety
#40I read the first example of Lily on the site. I found nothing offensive in the language at all - in fact there's a lot to like particularly the readability. Side rant. Unfortunate I can't get past the decision to use exception handling to deal with non-existing keys in map. I'm of the exception-disliking school which is thankfully growing but I guess not yet universal. For me using an exception to indicate the lack o…
Rust makes a similar decision, despite having Option and Result. If you want the Option behavior, there's .get() Anyways, very cool looking language.