João Costa @JD557@blog.joaocosta.eu Follow

Portuguese software engineer at Kevel.

My instance is running on a small server so please #nobot

Web

https://www.joaocosta.eu/

GitHub

https://github.com/JD557

Twitter

https://twitter.com/JD557

Itch.io

https://jd557.itch.io

  • Notes
  • Articles 6
  • Followers 42
  • Following 59
Daniel Spiewak's avatar
Daniel Spiewak
@djspiewak@fosstodon.org

in reply to this object

@fanf42 @lachezar I mean, in fairness, type Nel[+A] = ::[A] works perfectly fine. It's just highly uncommon to see people do something like that.

  • permalink
  • 3 months ago
João Costa's avatar
João Costa
@JD557@blog.joaocosta.eu

in reply to this object

@djspiewak@fosstodon.org @fanf42@treehouse.systems @lachezar@mastodon.nu

That still has an issue that the method return signatures are not overriden.

So you can't do:

type Nel[+A] = ::[A] val x: Nel[Int] = ::(1, ::(2, Nil)) // 1 :: 2 :: Nil is a List[Int] val y: Nel[String] = x.map(_.toString) // Doesn't work, returns List[String]
  • permalink
  • interact from your instance
  • 3 months ago
  • 1 like
  • 1 reply
Likes
@fanf42@treehouse.systems
fanf42's avatar
fanf42
@fanf42@treehouse.systems

in reply to this object

@JD557 @djspiewak @lachezar Yes, part of the thousand cuts

  • permalink
  • 3 months ago
Powered by microblog.pub 2.0.0+dev (source code) and the ActivityPub protocol. Admin.