GithubHelp home page GithubHelp logo

Comments (6)

kerneis avatar kerneis commented on July 17, 2024

On Wed, Jan 22, 2014 at 04:30:33AM -0800, Stephen Kell wrote:

Note that Cil.typ does encode this distinction, since the argument
list can be Some([]) or None.

Off the top of my head and without checking the code, isn't it precisely
the whole point of typsig ("normalising" equivalent types)?

I'll have a more detailed look at it next week.

from cil.

stephenrkell avatar stephenrkell commented on July 17, 2024

On Thu, 23 Jan 2014 13:32:15 -0800, Gabriel Kerneis wrote:

Off the top of my head and without checking the code, isn't it
precisely the whole point of typsig ("normalising" equivalent types)?

I'll have a more detailed look at it next week.

The point is that

int f(void);

and

int f();

are not equivalent in C. If you read the standard, you can find
several places where the treatment of a function type without an
argument list differs from that with an argument list (e.g. 6.2.7
"Compatible type and composite type", or 6.7.6.3 "Function declarators
(including prototypes)").

Next week (or later still) is fine... my workaround is working-around
nicely. :-)

Stephen

from cil.

kerneis avatar kerneis commented on July 17, 2024

Next release will be 2.0 with other incompatible changes. I don't care to break everybody's code if it does the right thing — that's why major releases are for. I suspect few people pattern-match on typsig anyway, they are intended for comparison in the first place; also, this is a trivial fix for affected users to do.

from cil.

stephenrkell avatar stephenrkell commented on July 17, 2024

It's definitely not trivial to work around in client code. The client asks for a typsig and gets one back which is subtly inaccurate, perhaps arbitrarily far down in the nest. Fixing it in the client means implementing your own typsig. (Also, I pattern-match on typsig an awful lot.)

My workaround happens far away, outside my CIL code, on detecting a failure which "shouldn't happen", and is an outrageous hack.

I'll produce a patch in (hopefully) a few weeks' time. In the meantime it would be more appropriate to leave this issue open, although as you wish.

from cil.

kerneis avatar kerneis commented on July 17, 2024

It's definitely not trivial to work around in client code.

There is a misunderstanding. I'll introduce an option in TSFun to
mimick the option in TFun. What I meant is that it will be trivial
for anybody relying on the old, option-less API to update their code.
And for you, with the new, accurate API, it's now trivial to take the
right decision.

from cil.

stephenrkell avatar stephenrkell commented on July 17, 2024

Ah, okay, cool. :-)

from cil.

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.