Comments (4)
I'm finding all the new stuff with keyword arguments pretty over-complex already, once you start working out all the detailed rules and test cases, and my instinct is that we've already gone overboard in the design, I would prefer to rein it back a bit rather than going even further.
Is this really needed so often that the existing solution of function($y, $x){math:pow($x, $y)}
isn't good enough?
from qtspecs.
That makes sense. This possibility came up when I was implementing parser support for KeywordArgument
.
from qtspecs.
While writing things like function($y, $x){math:pow($x, $y)}
is possible, I was thinking of possible use cases around bounded variadic functions -- that is where I could see this having more value. That is, instead of writing something like:
f(?, (), (), ?)
or:
->($a, $b) { f($a, collation: $b) }
you could express it more cleanly as:
f(?, collation: ?)
Here, it is clear that you are setting the collation as the second parameter, and can avoid issues where you have the wrong number of defaulted parameters and end up setting the wrong parameter.
from qtspecs.
The current specification implements this feature so I am closing the issue.
from qtspecs.
Related Issues (20)
- Residual references to union(A, B)
- new function - fn:tail-recurse a function to allow users to hand roll their recursion and guarentee tail recursion. HOT 11
- Attribute priority for xsl:accumulator-rule HOT 1
- Generalization of Deep Updates HOT 2
- Rendition of RFC2119 terms HOT 1
- Seralization Parameters: Indentation, Whitespace, Newlines HOT 2
- Function Identity: Treating function items with identical bodies HOT 12
- QT4CG-078-01 fn:unparsed-text-lines, normalize newlines HOT 4
- XSLT on-no-match="shallow-copy-all" - revised rules HOT 3
- XSLT xsl:next-match with select attribute HOT 1
- $sequence-of-maps ? info() HOT 4
- Node constructor vs. otherwise/map constructor HOT 3
- XSLT: system-property('xsl:xpath-version')
- fn:format-dateTime: Properties
- fn:json-to-xml: `number-parser` option HOT 1
- `??type(T)` in lookup expressions - shortcuts
- for member allowing empty HOT 2
- Allow sequence constructor in extension instructions that are implemented with named templates HOT 1
- Add a new function `fn:html-doc` HOT 2
- XSLT: add xsl:switch to list of instructions within which whitespace is ignored
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 qtspecs.