broadinstitute / poolq

The Genetic Perturbation Platform's tool for deconvoluting and quantifying the results of pooled screens
Other
5 stars 1 forks source link

Scala 3 #28

Closed mtomko closed 9 months ago

mtomko commented 10 months ago

https://github.com/broadinstitute/poolq/issues/5

nessus42 commented 10 months ago

Personally, if I were going to switch to then in if-then-else's, I wouldn't also use curly braces. I'd go completely new-style or stay completely old-style wrt this. I find the mixture to be a bit discombobulating.

OTOH, I have no interest in being a style nazi either.

:cat: :moon: 🎱

mtomko commented 10 months ago

I just run the compiler through with the first set of options described here:

https://docs.scala-lang.org/scala3/guides/migration/tooling-syntax-rewriting.html#the-new-syntax-rewrites

Namely, -new-syntax -rewrite. I manually replaced imports ending with ._ with .*, too.

Because Scala 3's syntactic changes are so new, I decided not to go to the indentation significant route yet. if-then-else plus for-do etc has the advantage (in my opinion) of having fewer parens, which offers some moderate value.

I may well go the route of significant indentation here at some point, though. If people feel like PoolQ should go whole hog, I'm happy to run the next set of compiler syntax rewrites. Perhaps I'll do that anyway and provide it as a commit at the end here, which we could decide to keep or drop.

kitbellew commented 10 months ago

I just run the compiler through with the first set of options described here:

https://docs.scala-lang.org/scala3/guides/migration/tooling-syntax-rewriting.html#the-new-syntax-rewrites

fyi: https://scalameta.org/scalafmt/docs/configuration.html#rewritescala3converttonewsyntax

mtomko commented 9 months ago

Closing in favor of https://github.com/broadinstitute/poolq/pull/34