Comments (3)
Generic parameter deduction is definitely not straightforward. Imagine:
fn foo<D>(x: Meter * D^3) -> Scalar = …
foo(3 * meter * time^2) // D^3 = time^2 ==> D = time^(2/3)
or even worse:
fn bar<D1, D2>(x: D1 * D2, y: D1, z: D2) -> Scalar = …
This is a potential use case and could probably be supported somehow but maybe we should first disallow this. Or only allow it in the opposite order.
from numbat.
Error cases to consider:
-
fn foo<Length>(x: Length) = …
-
fn foo<D1, D2>(x: D1*D2) = …
(see above) -
fn foo<D1>(x: Scalar) -> Scalar = …
from numbat.
from numbat.
Related Issues (20)
- Support for RFC 3339 in target time zone HOT 7
- Unexpected panic when using datetime formatter HOT 2
- Metric teaspoon and tablespoon missing
- log with arbitrary base
- Create data folder if it does not exist HOT 3
- logaritmic operations with units and decibel HOT 1
- 'human' doesn't work great for negative durations
- darcy as unit HOT 1
- arbitrary precision calculation HOT 5
- Functionality to easily copy output of last calculation to clipboard HOT 5
- Add semicolon as optional statement separator
- Add functionality to solve quadratic equation HOT 5
- LCM and GCD functions HOT 2
- Errors while developing aren't very human-readable HOT 3
- why is creating a function that has raising a power in it so complicated? HOT 2
- Allow for "forced let" HOT 1
- Random distribution sampling HOT 4
- Suggest correct casing if the entered unit doesn't exist HOT 3
- Add info for functions HOT 1
- Binary operations with callables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from numbat.