Skip to content

Comment on Gleam v1.17.0

Comments

Huh, I didn't know how much I needed a "todo" type until now. So often I'll be defining a packet sumtype, or a collection, and not have created the type yet, so just use ubyte, or Object, or whatever. Having an explicit "todo" type would be amazing in other languages.

Scala has had a function called ??? which fills the same role and it’s really useful.

https://scala-lang.org/api/3.3.1/scala/Predef$.html#???-0

Rust has the todo!() macro but no todo type. I use todo! constantly and would probably make heavy use of a todo type as well...

Todo type in rust will be a never type. Eg thing which exit or panic returns

Oh I hadn't thought about that!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.