Giter VIP home page Giter VIP logo

Comments (5)

mattiase avatar mattiase commented on August 13, 2024

Yes, I noticed that too and agree it's a bit annoying when evaluating several phrases in a row with C-M-x and suddenly getting stuck because of a ;; on a line of its own.

From looking at the source it might be intentional – see tuareg--skip-backward-comments-semicolon and tuareg--skip-forward-comments-semicolon for example. There could be subtleties involved. Let's hear what the maintainers have to say about it.

from tuareg.

monnier avatar monnier commented on August 13, 2024

I doubt these subtleties in those functions are meant to provide the behavior under discussion.

But FWIW, I'm probably not the right person to answer since I consider double-semi-colons in files to be non-kosher.

from tuareg.

mattiase avatar mattiase commented on August 13, 2024

I think most people avoid ;;, but they often remain when they do get inserted for whatever reason – as when the compiler throws a seemingly nonsensical error that needs to be narrowed down. They are also very common in test suites, which can be quite useful to run piecemeal using C-M-x.

Double-semis are also used a lot by students learning the language and we should be nice to them once in a while.

from tuareg.

monnier avatar monnier commented on August 13, 2024

from tuareg.

Fourchaux avatar Fourchaux commented on August 13, 2024

@mattiase
Skipping lines that only contain ;; would already be a very big improvement.

BTW, this "style" is used by some big guns:
X. Leroy: https://github.com/ocaml/ocaml/blob/trunk/parsing/location.ml
or D.Doligez: https://github.com/ocaml/ocaml/blob/trunk/driver/main_args.ml
(for the first reason you give - improving the error messages - I suppose).

from tuareg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.