<fons>
the starting character shoul _be_ any of these, sorry
<fons>
that is confusing ...
<fons>
would anyone care to clarify, please?
<fons>
ftrvxmtrx: The resulting function from "let (::) a b = a :: b" is not an infix operator, is it? and then, then, if it's just a function, shouldn't it start with a letter?
<ftrvxmtrx>
if it doesn't start with one of these chars, it won't work as infix operator
<ftrvxmtrx>
yes, it's not infix
<fons>
ftrvxmtrx: but function identifiers are supposed to start with a letter, right?
<ftrvxmtrx>
not necessarily
<fons>
how come? I am reading the lexer's grammar in the documentation, and it seems like it
<ftrvxmtrx>
it also may start with undescore
<ftrvxmtrx>
strangely I can't find it in the documentation :(
<ftrvxmtrx>
"Underscore is considered a lowercase letter for this purpose."
<fons>
but it doesn't mention : as a valid starting character for function names, see the definition of value-name
<fons>
so either there is something wrong with my reasoning, or the implementation is not consistent with the documentation
<fons>
otherwise :: would be rejected as a function name
<ftrvxmtrx>
seems like "function" and "infix operator" is somewhat different then
<ftrvxmtrx>
let :: a b = ... won't work
<ftrvxmtrx>
but let (::) ... will
Snark has joined #ocaml
Anarchos has quit [Quit: reboot system]
sdj has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD__ has joined #ocaml
BiDOrD has quit [Read error: Connection reset by peer]
sdj has quit [Ping timeout: 240 seconds]
BiDOrD_ has quit [Ping timeout: 240 seconds]
ztfw has joined #ocaml
googi has joined #ocaml
DimitryKakadu has quit [Ping timeout: 240 seconds]
DimitryKakadu has joined #ocaml
Smerdyakov has joined #ocaml
Smerdyakov has left #ocaml []
cyounes has joined #ocaml
<fons>
ok, the implementation of the compiler is definitively not consistent with the documentation when it comes to letting a function have :: as a name
<cyounes>
hi
<fons>
I don't know if it's worth filing a bug for such a stupid corner case
<fons>
actually, toplevel does not accept "let (::) _ _ = 1 ;;"
cyounes has left #ocaml []
BiDOrD_ has joined #ocaml
googi has quit [Remote host closed the connection]
BiDOrD__ has quit [Read error: Connection reset by peer]
BiDOrD has joined #ocaml
mnabil has quit [Ping timeout: 265 seconds]
BiDOrD_ has quit [Ping timeout: 260 seconds]
<fons>
but my program compiles and it´s redifining ::, strange
clog has joined #ocaml
palomer has joined #ocaml
aklt has joined #ocaml
cYounes has joined #ocaml
cYounes is now known as H4rdcLOwn
Edward has joined #ocaml
H4rdcLOwn has left #ocaml []
Snark has quit [Remote host closed the connection]
<flux>
:: is a constructor
<flux>
and a build-in for one
<flux>
didn't know it could be re-defined, though
<flux>
but that doesn't work with camlp4 :/
ztfw has quit [Remote host closed the connection]
gildor has quit [Ping timeout: 240 seconds]
gildor has joined #ocaml
DimitryKakadu has quit [Remote host closed the connection]
Anarchos has joined #ocaml
<palomer>
you can also redefine true and false
<palomer>
type foo = true of int
<flux>
and array indexing
<palomer>
that I didn't know
<palomer>
what's the syntax?
<flux>
by redefining the array-module :)
Edward has quit [Ping timeout: 245 seconds]
<flux>
they map into Array.set/get
<palomer>
ahh
sdj has joined #ocaml
<adrien>
I remember a PR where defining an option type and/or None/Some broke other things
<palomer>
that's strange
<palomer>
internally, ocaml differentiates the built in option type from user defined option types