caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ivan Gotovchits <ivg@ieee.org>
To: Alain Frisch <alain.frisch@lexifi.com>
Cc: Nils Becker <nils.becker@bioquant.uni-heidelberg.de>,
	 "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Ocaml optimizer pitfalls & work-arounds
Date: Thu, 19 Jan 2017 10:35:03 -0500	[thread overview]
Message-ID: <CALdWJ+wULRf4k+xtUCP3Tq6e9ohKVG=4TC435HB9MZE3B+f3Eg@mail.gmail.com> (raw)
In-Reply-To: <d76b7c7c-431c-7cde-b257-004db15bb6b7@lexifi.com>

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

On Thu, Jan 19, 2017 at 9:35 AM, Alain Frisch <alain.frisch@lexifi.com>
wrote:
>
> (Another argument in favor of the status quo is that writing
> "FloatArray.get a i" is syntactically heavier than "a.(i)". Interestingly,
> I don't feel that the ability to write polymorphic code on arrays and apply
> it to (unboxed) float arrays is considered as a very important property.)
>

This  is not a big issue, as you can write:

    module Array = FloatArray
    a.(i)

and it resolve to a call to the FloatArray.get function, as x.(i) is a
syntactic sugar for `Array.get x i`. The same is true to bigarrays. This is
kind of a non-documented  feature, though.



> -- Alain
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

[-- Attachment #2: Type: text/html, Size: 1926 bytes --]

  reply	other threads:[~2017-01-19 15:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19  6:51 Mark Hayden
2017-01-19 11:20 ` Nils Becker
2017-01-19 11:39   ` Gabriel Scherer
2017-01-19 13:26     ` Frédéric Bour
2017-01-19 14:35   ` Alain Frisch
2017-01-19 15:35     ` Ivan Gotovchits [this message]
2017-01-19 17:02       ` Hezekiah M. Carty
2017-01-19 15:41     ` Gerd Stolpmann
2017-01-19 13:41 ` Yaron Minsky
2017-01-19 17:59   ` Mark Hayden
2017-01-19 22:30     ` Yaron Minsky
2017-01-22 20:06       ` Berke Durak
2017-01-23 16:33         ` David McClain
2017-01-21 14:39 ` [Caml-list] <DKIM> " Pierre Chambart
2017-01-19 14:32 [Caml-list] " Hongbo Zhang (BLOOMBERG/ 731 LEX)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALdWJ+wULRf4k+xtUCP3Tq6e9ohKVG=4TC435HB9MZE3B+f3Eg@mail.gmail.com' \
    --to=ivg@ieee.org \
    --cc=alain.frisch@lexifi.com \
    --cc=caml-list@inria.fr \
    --cc=nils.becker@bioquant.uni-heidelberg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).