Conversation
mbeckerle
left a comment
There was a problem hiding this comment.
+1
These changes in Scala really are improvements, and they remove spurious differences from Java that were always unnecessary.
I suppose before Scala had its own identity there was a tendency to want it to be differentiated from Java syntax, but now that Scala is more widespread, there's no reason not to use the same syntax as Java for the same concepts. Everyone who learns Scala will either have learned Java before, or will learn Java after, so matching syntax for the same concepts helps, and eliminating the overloading of the same symbols like "=>" for multiple purposes is just a good idea.
I've been using Scala for 15 years and I've always wondered whether there was yet another overloading of the "_" character hidden somewhere in the syntax. :-)
stevedlawrence
left a comment
There was a problem hiding this comment.
+1, one minor suggestion
| try { | ||
| // TODO scala 2.12 phase out, we can remove the check for the plain name, and always | ||
| // check the lazy name version instead | ||
| clazz.getDeclaredField(fieldName) |
There was a problem hiding this comment.
Should we keep this try/catch, just with a tweak to the comment?
This function is about using reflection to find a specific field of a class, so ideally it would work regardless if the field is lazy. With this change it only works for lazy fields.
Currently we only use it for parents, which is lazy and so everything works, but if we ever change parents to be non-lazy or use this function for some other non-lazy field it won't work as expected.
- remove specific scala-2 folders and move contents scala-3 folders into main scala - update import ._ to .* - update import rename => to as, and remove braces - update type wildcard _ to ? - update anonymous type param * to _ - update vararg :_* or @_* to * DAFFODIL-3016, DAFFODIL-3011
26f7504 to
68f2b05
Compare
DAFFODIL-3016, DAFFODIL-3011