Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:34
    brunnerant commented #7689
  • 19:11
    smarter synchronize #7690
  • 19:11
    smarter review_requested #7690
  • 19:11
    smarter assigned #7690
  • 19:11
    smarter opened #7690
  • 18:48
    abeln commented #7546
  • 18:46
    abeln synchronize #7546
  • 18:19
    nicolasstucki commented #7689
  • 17:59
    noti0na1 synchronize #7546
  • 17:59
    nicolasstucki synchronize #7687
  • 17:41
    nicolasstucki review_requested #7689
  • 17:39
    brunnerant commented #7689
  • 17:39
    brunnerant commented #7689
  • 17:07
    brunnerant edited #7689
  • 17:06
    brunnerant commented #7689
  • 17:03
    brunnerant opened #7689
  • 15:39
    smarter commented #7688
  • 15:35
    bishabosha labeled #7688
  • 15:35
    bishabosha labeled #7688
  • 15:35
    bishabosha opened #7688
Miles Sabin
@milessabin
That would have happened whatever anyone did or said.
nafg
@nafg
yes
Guillaume Martres
@smarter
I guess no one is scared by-Y flags the same way no one is scared by import bla.experimental
nafg
@nafg
cf. macros
The bottom line is if you give people a feature they will enjoy it and then if you take it away they will complain
Miles Sabin
@milessabin
It's better in than out. macro-paradise relied on being able to monkey-patch the compiler it's loaded into as a plugin. It can break with the tiniest changes to the compiler.
nafg
@nafg
disclaimers don't change that much
That seems to be a general philosophy of dotty
Guillaume Martres
@smarter
The question is, how many other macro annotations like @Lenses can't be replaced by typeclass derivation / other features, and how popular are they
nafg
@nafg
Slinky?
Guillaume Martres
@smarter
what does slinky do ?
nafg
@nafg
it's a scalajs facade for React
Guillaume Martres
@smarter
but what does it use macro annotations for
nafg
@nafg
Something I would do if it was supported, in scalajs-react ( a different facade for it, which I use) you have this pattern of object Component { case class Props(...); val component = ... }; Component.component(Component.Props(...))) and it would be great to automatically generate an apply method matching the signature of Props that passes them to the component
This message was deleted
Guillaume Martres
@smarter
Aren't react components obsolete now ? :)
nafg
@nafg
Huh?
Oh you mean because of hooks?
Guillaume Martres
@smarter
yeah
nafg
@nafg
heh
Kai
@neko-kai

@smarter

might be better to not have something that have something which people are unhappy with: scala/bug#10766

The subtype operator, if addressed on its own, is implementable without global state / unavoidable concurrency-problems. Unfortunately that might not be enough for hypothetical corporations with legacy scala-reflect code, but that would be enough for my company… And we’re actually implementing it right now – probably won’t copy the entire Scala typer and limit the checks to the common kinds of the types that actually appear in our codebase.

https://github.com/freechipsproject/chisel3 uses a few macro annotations, not sure if these would be hard to replace; seems like they’re just for renaming defs
Guillaume Martres
@smarter
A full implmentation of subtyping is extremely complex
Alexander Myltsev
@alexander-myltsev
what happenned to backticks? I’m trying to address the Akka's ContentTypes.`text/html(UTF-8)` , but the compiler states there is no such method
David Gregory
@DavidGregory084
Is there any plan to implement syntactic / untyped macros as part of the new macro system?
Guillaume Martres
@smarter
@alexander-myltsev you're probably running into this bug: lampepfl/dotty#5936
@DavidGregory084 untyped macros is something we would like to not have
Guillaume Martres
@smarter
In fact, dotty doesn't even let you write a compiler plugin that runs before the typer phase
David Gregory
@DavidGregory084
Ah OK, why is that? It occurred to me that it would allow features like for comprehensions to be removed from the compiler
Guillaume Martres
@smarter
Because it effectively means you can make up your own language
Which is nice for research (and in fact we support "research plugins" which can run before typer but can only be used with nightly builds of the compiler), but not great for users or tools
Kai
@neko-kai
That just means better-monadic-for users will run the research compiler :^)
Guillaume Martres
@smarter
Better-monadic-for users should make a SIP so we can get the improvements in the compiler.
David Gregory
@DavidGregory084
Yeah I'm looking at that
Guillaume Martres
@smarter
Maybe that would have already happened if untyped macros were not a thing.
@DavidGregory084 looking forward to it!
David Gregory
@DavidGregory084
It's not trivial though, even the simplest changes (e.g. removing the superfluous map call) break lots of standard library code
(If it's implemented by changing the desugaring after parsing)
So I was wondering whether there might be other approaches in the long term
Guillaume Martres
@smarter
Scala 3 is trying to move Scala away from being a toolbox for making your own language
@DavidGregory084 you don't have to produce a document with all the problems worked out, even identifying the problems is already useful to start the process
David Gregory
@DavidGregory084
Yeah sure, I'm just working through what it's like to implement the simplest possible solution for each of the major features right now and identifying how much breakage it causes
Guillaume Martres
@smarter
Cool
Alexander Myltsev
@alexander-myltsev

@alexander-myltsev you're probably running into this bug: lampepfl/dotty#5936

@smarter ok, thanks

is that another compiler bug?

[error] (Compile / compileIncremental) java.lang.AssertionError: assertion failed: denotation module class annotation invalid in run 1. ValidFor: Period(1..5, run = 2)
[error] Total time: 0 s, completed Jul 24, 2019 10:33:32 PM
Guillaume Martres
@smarter
@CremboC Your confusion on the syntax of delegate is a useful data point on its current usability, I encourage you to comment on https://contributors.scala-lang.org/t/proposal-to-add-implied-instances-to-the-language/3070 with your experience
@alexander-myltsev if the compiler crashes, it's a bug.
nafg
@nafg
@benhutchison maybe lampepfl/dotty#6919 can help?