Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Literal collections in Cypher - feedback wanted!
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andres Taylor  
View profile  
 More options May 8 2012, 5:33 am
From: Andres Taylor <andres.tay...@neotechnology.com>
Date: Tue, 8 May 2012 11:33:14 +0200
Local: Tues, May 8 2012 5:33 am
Subject: Literal collections in Cypher - feedback wanted!

Hey amigos,

The Range<http://docs.neo4j.org/chunked/snapshot/query-function.html#_iterable_...>feature
is important, but it doesn't feel right as a function. I want to
turn it into a literal expression instead. How would that look?

Groovy:
inclusive 5..8
exclusive 5>..<8

Scala:
inclusive 5 to 8
exclusive 5 until 8
inclusive, step 3 5 to 81 by 3

Ruby:
inclusive 5..8
exclusive 5...8

Lucene:
inclusive [5 TO 8]
exclusive {5 TO 8}

????
inclusive [5..8]
exclusive ]5..8[

WDYT? And, is step an important to make this useful?

Andrés


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options May 8 2012, 6:22 am
From: Michael Klishin <michael.s.klis...@gmail.com>
Date: Tue, 8 May 2012 14:22:23 +0400
Local: Tues, May 8 2012 6:22 am
Subject: Re: [Neo4j] Literal collections in Cypher - feedback wanted!
Andres Taylor:

> WDYT? And, is step an important to make this useful?

Step is relatively rarely used in my experience. Ruby's literal is the least noisy. Scala's approach
would work if Cypher was all similar to "point free Scala" but it's not.

What about

[1.0,2.0]
[1.0,2.0)

and so on?

I personally wouldn't mind having range as a function.

MK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nigel Small  
View profile  
 More options May 8 2012, 8:06 am
From: Nigel Small <ni...@nigelsmall.net>
Date: Tue, 8 May 2012 13:06:52 +0100
Local: Tues, May 8 2012 8:06 am
Subject: Re: [Neo4j] Literal collections in Cypher - feedback wanted!

I like the [a,b) notation from a mathatical point of view but it's
potentially unfamiliar notation to some (and may cause havoc in a text
editor with bracket matching!). I agree that the ellipsis notation is
cleanest but the difference between ".." and "..." isn't necessarily
intuitive to non-Ruby programmers.

Keeping *range* as a function would seem to be the best lowest common
denomiator and IMHO would adhere to the principle of least surprise. But
maybe that's my Python head talking :-)

On 8 May 2012 11:22, Michael Klishin <michael.s.klis...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »