Open djneades opened 4 years ago
Thanks! I’ll see what I can do
Thank you for considering the suggestion! I really appreciate all your work on Fira Code.
Thank you for your generous donation 🙏
Dotty is now the default compiler.
Indeed, Scala 3 code will benefit greatly from this ligature. Thank you :pray:
Current behavior,
Just for transparency, this is on VSCodium 1.89.1, font size 14.
Here are some examples:
type Executable[T] = ExecutionContext ?=> T
// ___________________________________^
def table(init: Table ?=> Unit) =
// ___________________^
given t: Table = Table()
init
t
def row(init: Row ?=> Unit)(using t: Table) =
// _______________^
given r: Row = Row()
init
t.add(r)
def cell(str: String)(using r: Row) =
r.add(new Cell(str))
In Scala there is also a =>
, but usually ?=>
also has the keywords given
and using
around it, in fact A ?=> B
expands to using A => B
. For non-scala programmers, and in omitting a lot of details, it would mean something like "function from A to B; given a value of type A at compile time."
Here are more examples:
https://www.scala-lang.org/api/3.4.2/docs/docs/reference/contextual/context-functions.html
It would be great to have a ligature for
?=>
, which is used by Scala 3 (Dotty) to define context functions.