Code Monkey home page Code Monkey logo

Comments (2)

jfecher avatar jfecher commented on September 28, 2024

I am debating even including static arrays in Ante. The array literals you see will most likely be a vector-like type by default and thus will already have the size included. For me, it is extremely rare when I would ever use a static array, and a dynamic array would still be valid in all of those scenarios. Furthermore, since vectors would be first class citizens, the compiler would know about them and know when the size value could be optimized away.

from ante.

PavelVozenilek avatar PavelVozenilek commented on September 28, 2024

I am debating even including static arrays in Ante.

This sounds reasonable (to give them up). If Ante will have the ability to use custom allocators then one could carve up part of the stack, make arena allocator and it would have the same layout and the same speed as static array sitting there. Short arrays inside structures (like 2D/3D points) could be turned into handful of named members, long arrays would only hog the cache.

The language converts variable number of arguments into static array. This should be taken into consideration.

I though about my idea a bit and got a counter-example: say I want to have array container of owned pointers (self deleting pointers). This can be rather easily implemented as an object but it would not (easily) fit into the unified array idea.

I am closing this for good.

from ante.

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.