Coder Social home page Coder Social logo

Comments (6)

jbalestr42 avatar jbalestr42 commented on June 28, 2024

Il y a un bug avec size aussi, il return 0 lorsqu'on utilise pas la method push

from octolib.

IohannRabeson avatar IohannRabeson commented on June 28, 2024

@jbalestr42 tu prefere que je lance des exceptions si:

  • quand on ajoute un element y'a plus de place
  • quand on pop le buffer est vide

Ou juste des assertions?
Sachant que si le programme s'arrete pas, c'est la merde.
Je penche pour les exceptions pour l'instant mais j'me demandai s'que tu en pensais.

from octolib.

jbalestr42 avatar jbalestr42 commented on June 28, 2024

hum, bonne question, si c'est la merde alors autant lever une exception, sa sera toujours mieux qu'un plantage pendant le jeu avec une grosse erreur dégueux

from octolib.

IohannRabeson avatar IohannRabeson commented on June 28, 2024

Ok, je fais ca alors.

from octolib.

IohannRabeson avatar IohannRabeson commented on June 28, 2024

En fait je me suis dis que pour les perfs, c'est pas terrible, donc j'ai laissé le choix a l'utilisateur de faire lui meme les verifications si cela lui semble important. Dans le meme temps, j'ai documenté et placé des assertions pour le cas ou on oublierai malgres tout de checker.
J'ai aussi rajouté une methode pour savoir si il y a assez de place dans le buffer.
Comme ca, je pense que l'utilisateur peut si il control ebien la situation se passer de faire des tests, ou n'en faire qu'un minimum.

from octolib.

jbalestr42 avatar jbalestr42 commented on June 28, 2024

ok, bonne idée :)

from octolib.

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.