<discocaml>
<barconstruction> dh, by sealing I meant
<discocaml>
<barconstruction> module M : sig
<discocaml>
<barconstruction> ...
<discocaml>
<barconstruction> end
<discocaml>
<barconstruction> = struct
<discocaml>
<barconstruction> ...
<discocaml>
<barconstruction> end
<discocaml>
<barconstruction> And by "checking that a module implements the signature" I meant in a non sealing way, something like
<discocaml>
<barconstruction> module M = struct ... end
<discocaml>
<barconstruction> module M' : sig ... end = M
<discocaml>
<barconstruction>
<discocaml>
<barconstruction> Here M' is not supposed to be used anywhere else it is just a compile time check that the module provides the functionality you want it to, guaranteeing that it can be used at certain points in the program (even if it isn't currently)
<discocaml>
<barconstruction>
<discocaml>
<barconstruction> It is a subjective distinction to say that one is more valuable than the other, my reasoning is that it's less common to have multiple modules implementing the exact same exposed functionality, but more common to have multiple modules which implement at least so much functionality at the client side point where they will be used.
jabuxas has quit [Quit: oops :p]
jabuxas has joined #ocaml
jabuxas has quit [Remote host closed the connection]
jabuxas has joined #ocaml
gentauro has quit [Read error: Connection reset by peer]
jabuxas has quit [Quit: oops :p]
waleee has quit [Ping timeout: 268 seconds]
jabuxas has joined #ocaml
<discocaml>
<yawaramin> `module _ : S = M` also works
gentauro has joined #ocaml
jabuxas has quit [Read error: Connection reset by peer]
jabuxas has joined #ocaml
gzar has quit [Quit: WeeChat 4.2.2]
<dh`>
ah, I see what you mean
<dh`>
not sure I agree though, for separate-compilation modules you always want sealing (otherwise there's little point)
<dh`>
and in most other cases you're doing functor works and in those it is also often highly desirable to seal off the internals
<discocaml>
<limp.biskit> does containers have an equivalent to Base.List.split_n?
<discocaml>
<barconstruction> I think we are partially on the same page about functors. A functor cannot access any part of the module it relies on beyond what is declared in the interface specified by the client (the author of the functor) and I think that interface should be written explicitly as a signature.
<discocaml>
<barconstruction> I agree that "it is highly desirable to seal off the internals" but one can leave that to the functor author who writes an interface specifying what the module type of its argument should be.
<discocaml>
<barconstruction>
<discocaml>
<barconstruction> My point is more about the principal signature for the module that it exposes to the rest of the program.
jabuxas has quit [Read error: Connection reset by peer]
jabuxas has joined #ocaml
oriba has quit [Ping timeout: 264 seconds]
jabuxas has quit [Read error: Connection reset by peer]
jabuxas has joined #ocaml
jabuxas has quit [Remote host closed the connection]
jabuxas has joined #ocaml
jabuxas has quit [Quit: oops :p]
jabuxas has joined #ocaml
jabuxas has quit [Read error: Connection reset by peer]
jabuxas has joined #ocaml
jabuxas has quit [Remote host closed the connection]
dh` has quit [Read error: Connection reset by peer]
dh` has joined #ocaml
jabuxas has joined #ocaml
jabuxas has quit [Quit: oops :p]
jabuxas has joined #ocaml
jabuxas has quit [Read error: Connection reset by peer]
jabuxas has joined #ocaml
trillion_exabyte has quit [Read error: Connection reset by peer]
trillion_exabyte has joined #ocaml
<anadon>
dh`: I'd like to use your split3.ml wholesale in my project, copyright to you GPLv3 or similar in a standalone file. Is that OK with you? I'd add attributions at the top as usual and code would live at https://gitlab.com/anadon/detect_programs_called_from_script
jabuxas has quit [Remote host closed the connection]
jabuxas has joined #ocaml
jabuxas has quit [Ping timeout: 260 seconds]
mbuf has joined #ocaml
dh` has quit [Read error: Connection reset by peer]
dh` has joined #ocaml
deadmarshal_ has quit [Remote host closed the connection]