Comments (4)
Should we allow the LHS of a dynamic function call to be a sequence?
While I’m generally in favor of sequence processing, I feel this could be over the top. It would make ()()()()()()()
legal, and it’s already difficult for non-HOF-people to swallow that ()()
is correctly parsed – and that the pairs of parentheses have a different meaning.
from qtspecs.
This doesn't feel to me like a very strong argument. *****
and ++++++1
and ------1
all parse and execute just fine, and no-one complains. And if we want to avoid strange-looking expressions, then forcing people to write ($maps?info)!.()
is surely a worse offence.
from qtspecs.
This doesn't feel to me like a very strong argument.
*****
and++++++1
and------1
all parse and execute just fine, and no-one complains. And if we want to avoid strange-looking expressions, then forcing people to write($maps?info)!.()
is surely a worse offence.
I’d like to add that the new proposal reminds me of another one that got rejected a while ago… #707 (comment)
Personally, I would certainly use the new syntax (let’s see what others say).
When I occassionally present the new features to potential future users, my impression is that 4.0 evolves more and more into an expert language, and we won’t deter this target group anyway. As far as I can judge, the most popular features of 4.0 will be the map constructor without the map
keyword ;) Admittedly, a feature that makes expressions shorter.
from qtspecs.
I'm getting more into the habit of using expressions like $json??entry::item?parent()
and the fact that this fails because $json??entry::item?parent
selects more than one function is a constant gotcha: it definitely needs to be fixed. At the moment I'm typically getting around it with for $e in $json??entry::item return $e?parent()
which feels clumsy (but a lot more readable than the equivalent using !
, namely $json??entry::item!.?parent()
It's tempting to try $json??entry::item =!> parent()
but that fails hopelessly because parent
isn't a function in the static context. And $json??entry::item =?> parent()
fares no better; though it would work if we defined parent() to be an arity-1 function rather than arity-0.
I'm also starting to realise that such expressions lead to a requirement for deduplication if two items have the same parent. I'll park that issue for the moment until I understand it better.
from qtspecs.
Related Issues (20)
- Grammar rules: redundancies HOT 1
- Nothing HOT 67
- unparsed-text-available() signature
- declare item type → item-type
- Names of private functions in XQuery library modules HOT 4
- Rendering of new vs. updated features HOT 3
- map:get and array:get HOT 34
- Occurrence indicator meaning "exactly one" HOT 8
- In the EBNF, use explicit separator syntax HOT 1
- Further improvements to BuiltInKeywords test needed HOT 4
- fn:round: `rounding-mode` → `mode`? HOT 1
- (type)switch: braces after `case` keyword HOT 3
- Unknown option: FORG0013 → XPTY0004 HOT 2
- XQFO: Editorial HOT 1
- Duplicate keys in map constructor HOT 3
- XSLT: names of functions in pattern HOT 3
- User defined operators HOT 5
- Circular dependencies: XQDY0054 vs. XPST0008 vs. optional errors HOT 5
- fn:parse-uri: Observations (cont.) HOT 6
- Missing XSLT error code
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.