alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
rkallos has joined #ponylang
_whitelogger has joined #ponylang
Summertime has quit [Quit: Sunsetting.]
Summertime has joined #ponylang
endformationage has quit [Quit: WeeChat 2.3]
_whitelogger has joined #ponylang
_whitelogger has joined #ponylang
brainproxy has quit [Ping timeout: 246 seconds]
brainproxy has joined #ponylang
<vaninwagen>
^5 jdhorwitz
ensrettet has joined #ponylang
ensrettet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ExtraCrispy has joined #ponylang
endformationage has joined #ponylang
brainproxy has quit [Ping timeout: 245 seconds]
erip has joined #ponylang
<erip>
Hey all.
<erip>
Is there a bottom type in pony?
<erip>
I'm trying to create a `Maybe[A]` implementation. I have something like this:
<erip>
```interface Maybe[A] fun map[B](f: {(A): B}): Maybe[B]```
<erip>
(Sorry, I don't know formatting in IRC)
<erip>
The problem with this is when I implement `class Nothing is Maybe[???]`, I don't know what ??? should be.
<erip>
I've tried `Maybe[Any]`, but when I make my `map` impl return `Nothing`, I get `function body isn't the result type fun map[B](f: {(None): B}): Maybe[B] => Nothing`
erip has quit [Ping timeout: 256 seconds]
brainproxy has joined #ponylang
<vaninwagen>
A maybe that you might know from scala or haskell is best implemented as a union type in pony:
<vaninwagen>
type Maybe[T] is (T | None)
<vaninwagen>
you could also do primitive Nothing[T] is Maybe[T]
<vaninwagen>
erip: ^
<vaninwagen>
Afaik there is no such thing as a Nothing (like in scala) in pony
<vaninwagen>
Nothing in scala i think is a subtype of every other type (please correct me if i'm wrong)