tchncs
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
apoiselM to OCamlEnglish · 3 days ago

Learning OCaml: Printing Data Structures

batsov.com

external-link
message-square
0
link
fedilink
3
external-link

Learning OCaml: Printing Data Structures

batsov.com

apoiselM to OCamlEnglish · 3 days ago
message-square
0
link
fedilink
If there’s one thing that frustrated me early on in my OCaml journey, it was printing stuff. In Ruby I can p anything and get a useful representation. In Clojure, prn just works on every data structure. In OCaml? There’s no generic print that works on any type – the type information is erased at runtime, so the language simply doesn’t know how to stringify an arbitrary value.
alert-triangle
You must log in or # to comment.

OCaml

ocaml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !ocaml@discuss.tchncs.de

An industrial-strength functional programming language with an emphasis on expressiveness and safety. Website: www.ocaml.org

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 6 users / week
  • 10 users / month
  • 28 users / 6 months
  • 46 local subscribers
  • 357 subscribers
  • 264 Posts
  • 19 Comments
  • Modlog
  • mods:
  • apoisel
  • BE: 0.19.16
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org