Skip to content

Beginner questions #525

Answered by erikerlandson
jportway asked this question in Q&A
Nov 3, 2023 · 6 comments · 16 replies
Discussion options

You must be logged in to vote

I'm not 100% convinced this is a thing coulomb should officially support. It raises at least as many questions as it answers. For example, what, if any, definition is there for Depth * Wavelength - these types are not closed under multiplication, power, etc.

If all you want is to properly distinguish Depth from Wavelength, then standard case classes are arguably sufficient:

case class Depth(d: Quantity[Double, Meter])
case class Wavelength(w: Quantity[Double, Meter])

Replies: 6 comments 16 replies

Comment options

You must be logged in to vote
4 replies
@jportway
Comment options

@benhutchison
Comment options

@erikerlandson
Comment options

@erikerlandson
Comment options

Comment options

You must be logged in to vote
3 replies
@erikerlandson
Comment options

@erikerlandson
Comment options

@erikerlandson
Comment options

Comment options

You must be logged in to vote
1 reply
@erikerlandson
Comment options

Comment options

You must be logged in to vote
5 replies
@erikerlandson
Comment options

@erikerlandson
Comment options

Answer selected by jportway
@jportway
Comment options

@erikerlandson
Comment options

@erikerlandson
Comment options

Comment options

You must be logged in to vote
1 reply
@erikerlandson
Comment options

Comment options

You must be logged in to vote
2 replies
@erikerlandson
Comment options

@erikerlandson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants