Better HN
topnewbestaskshowjobs
Log inSign up

the_anon_coward

1 karma · joined Jun 14, 2018 (8y ago) · 1 submissions

Submissions

comment 8y ago · link · parent

"See and despair: x<-y (assignment) is parsed differently than x < -y (comparison)!"

And that guy talks about computer science? "<-" is a single token, what is so hard about that? It is a lexing issue, not a parsing issue!

Surely one cannot accuse OCaml of being written by laymen:

  # type r = { mutable x : int };;
  type r = { mutable x : int; }
  # let y = { x=10 };;
  val y : r = {x = 10}
  # y.x <- 100;;
  - : unit = ()
  # y.x < -10;;
  - : bool = false