osm4scala icon indicating copy to clipboard operation
osm4scala copied to clipboard

Review Scala modeling and refactoring

Open angelcervera opened this issue 8 years ago • 1 comments

  • [ ] Refactor model to avoid enums / Don't use new Scala 3 enums to keep 2.11 back comp.
  • [ ] RelationMemberEntity:relationTypes should be singular instead plural or better call it one type

2017 comments: For example, in WayEntity.scala it is using Enums and Java style hierarchy. Two good explanation about why to avoid Enums, at least in Scala:

  • https://stackoverflow.com/questions/25305523/enum-vs-static-constants-memory-footprint
  • https://stackoverflow.com/questions/1898932/case-objects-vs-enumerations-in-scala

angelcervera avatar Jul 08 '17 11:07 angelcervera

Yes, agree 100% Enums is one of the main reasons to update it. Java mind from 2016 :smile:

angelcervera avatar Oct 21 '20 05:10 angelcervera