blaze / datashape

Language defining a data description protocol
BSD 2-Clause "Simplified" License
183 stars 65 forks source link

no argument function syntax #162

Open cpcloud opened 9 years ago

cpcloud commented 9 years ago

there doesn't appear to be a way to spell functions with no arguments, such as something like current_timestamp in some sql databases.

I tried () -> datetime and (void) -> datetime, and (null) -> datetime but none are valid datashapes. @mwiebe and @izaid might have a way to do this in libdynd. We should adopt their syntax if so.

cc @llllllllll

mwiebe commented 9 years ago

"() -> datetime" is what you're looking for, I believe.

izaid commented 9 years ago

We have (greatly) extended the syntax for functions in libdynd. As @mwiebe said, this particular case is "() -> datetime".