polymorphism   498

« earlier    

Modular implicits
Leo White, Frédéric Bour, Jeremy Yallop

“We present modular implicits, an extension to the OCaml language for ad-hoc polymorphism inspired by Scala implicits and modular type classes. Modular implicits are based on type-directed implicit module parameters, and elaborate straightforwardly into OCaml’s first-class functors. Basing the design on OCaml’s modules leads to a system that naturally supports many features from other languages with systematic ad-hoc overloading, including inheritance, instance constraints, constructor classes and associated types.”

Mentioned in the Reason/BuckleScript FAQ:

“Can I have a function to print arbitrary data structures?

If you're compiling to JavaScript through BuckleScript, you can use the JS console.log through Js.log. If you're compiling to native, you'll need something like ppx_show. A future OCaml feature (called modular implicit) will solve this directly in the language.”

/from http://www.lpw25.net/papers.html via https://reasonml.github.io/docs/en/faq.html#can-i-have-a-function-to-print-arbitrary-data-structures
paper  PLT  OCaml  polymorphism  module  type-systems  type-inference 
january 2018 by elliottcable
Modular implicits (Extended abstract)
Leo White, Frédéric Bour

“We propose a system for ad-hoc polymorphism in OCaml based on using modules as type-directed implicit parameters.”

Full paper was mentioned in the Reason/BuckleScript FAQ:

“Can I have a function to print arbitrary data structures?

If you're compiling to JavaScript through BuckleScript, you can use the JS console.log through Js.log. If you're compiling to native, you'll need something like ppx_show. A future OCaml feature (called modular implicit) will solve this directly in the language.”

/from http://www.lpw25.net/papers.html via https://reasonml.github.io/docs/en/faq.html#can-i-have-a-function-to-print-arbitrary-data-structures
paper  PLT  OCaml  polymorphism  module  type-systems  type-inference 
january 2018 by elliottcable

« earlier    

related tags

abstractdatatype  activerecord  address  adt  advanced  advocacy  analysis  annotations  apex  arrays  article  associated_types  associations  author:danielwestheide  autism  automata  avro  binding  blog  book  c#  c++  c  caml  cast  class  classes  clojure  closure  composition  computerscience  computing  consideredharmful  cplusplus  cpp  criticism  crtp  data-structures  dependenttypes  deserialization  deserialize  design  details  devel  development  dll  dynamic  dyno  ecto  elements  elixir  elm  encapsulation  event-handler  example  executable  explained  fail  family  field  fold  functional-programming  functional  games  generic  generics  genetics  ghc  github  go  golang  gson  hacking  haskell  higher-kinds  howto  http  if  implementation  important  inheritance  inspiration  instanceof  interface  interfaces  intro  jackson  jane-street  java  javascript  js  json  jsx  kind  kind:blogpost  leanpub  libraries  medium  mlsub  modular-implicits  module  modules  monomorphism  multimethod  multimethods  multiple  multipledispatch  namespaces  nil  nodejs  now  object  ocaml  oo  oop  optimization  oriented  override  paper  parametric  parametricpolymorphism  pathdependenttypes  pdf  pe  pentesting  performance  pl  platform  plt  polymorphic  ppx  programing  programming-languages  programming  proofs  proto  protocol  protocol_extensions  protocols  python  question  rails  rank-2  rank-n  records  recursive_types  reflective  research  rest  return  ruby  rubyonrails  rust  ryantomayko  salesforce  salesforce_apex  salesforce_interface  scala  schema  security  semantics  slides  snp  software-design  software  software_design  spring  stack-overflow  static  subtyping  swiftlang  talk  template  thesis  to-watch  tsx  type-inference  type-systems  type-theory  type  type_inference  type_members  type_theory  typeclass  typeclasses  types  typescript  v8  value  variant  video  visitor  vm  web  weekly.rc 

Copy this bookmark:



description:


tags: