NamedType
Squants
NamedType | Squants | |
---|---|---|
6 | 8 | |
742 | 910 | |
- | -0.1% | |
0.0 | 2.9 | |
over 1 year ago | 14 days ago | |
C++ | Scala | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
NamedType
- Named Types in C++
-
Named Booleans prevent C++ bugs and save you time
This article seems to be targeted towards beginners. From the title, I was expecting it to cover something like https://github.com/joboccara/NamedType, which is a technique I would recommend.
-
Please put units in names
I haven't used this library in particular or this one, but bless the authors and all the others for trying to make it happen… the project I'm now leading uses strongly typed strings for different component addresses, and it saves me to constantly look up the documentation what the functions need – it's beautiful.
-
Why do you like C++ ?
I think you are thinking of something like https://github.com/joboccara/namedtype
-
ISR Context Guards in C and C++ — Creating better interfaces for Embedded Systems by selecting the correct functions at compile time
The basic jist is that if you use strong types, you can dispatch more easily inside the function. Because of how the template function is generically written, I don't need to do any manual calls to the template parameters, it all gets figured out through automatic template deduction. In this example I'm using really simple types, but in a more production system I would use something more along the lines of Jonathan Boccara's NamedType. Here is a great article that explains it pretty well [link].
- Alternative to long boolean parameter lists
Squants
-
Improving our safety with a physical quantities and units library
Scala's squants library is a nice implementation of units-of-measure/dimensional-analysis http://www.squants.com
In particular it uses types for dimensions; whilst units are just constructors. Hence `Meters(2)` and `Microns(7)` have the same type (`Length`).
- Show HN: Numbat – A programming language with physical dimensions as types
- The type system is a programmer's best friend
-
Is Scala a good choice for a data intensive web backend?
squants for the “Market” package to use in financial calculations.
-
Please put units in names
take a peek at https://www.squants.com looks like not in your language, but maybe you can apply some same concepts
-
Atlas, a (hopefully) better engineering IDE
You might find the Squants library for Scala interesting; it even seems like an apt usage of some oft-questioned language features.
https://github.com/typelevel/squants
- Ratio Templates?
What are some alternatives?
newtype-ts - Implementation of newtypes in TypeScript
Breeze - Breeze is a numerical processing library for Scala.
durationcheck - Go linter to detect erroneous multiplication of duration values
Axle - Axle Domain Specific Language for Scientific Cloud Computing and Visualization
PredictionIO - PredictionIO, a machine learning server for developers and ML engineers.
Spire - Powerful new number types and numeric abstractions for Scala.
rscala - The Scala interpreter is embedded in R and callbacks to R from the embedded interpreter are supported. Conversely, the R interpreter is embedded in Scala.
Compute.scala - Scientific computing with N-dimensional arrays
FACTORIE - FACTORIE is a toolkit for deployable probabilistic modeling, implemented as a software library in Scala. It provides its users with a succinct language for creating relational factor graphs, estimating parameters and performing inference.
Smile - Statistical Machine Intelligence & Learning Engine
Rings - Rings: efficient JVM library for polynomial rings
Apache Spark - Apache Spark - A unified analytics engine for large-scale data processing