GithubHelp home page GithubHelp logo

Comments (4)

asterite avatar asterite commented on August 18, 2024 1

@kotp Thank you! I'll close this issue then. The many styles of programming will be seen when users solve the problems (I'll try to slowly solve them too) :-)

from crystal.

kotp avatar kotp commented on August 18, 2024

TL;DR; The code in the example.cr is "proof of concept" rather than idiomatic, but there is no reason it couldn't be idiomatic code. It is not "front facing", not presented to the users of Exercism, but of course is available for those that are curious.


Kytrina has mentioned that the example code in the repository has been "Proof Of Concept", and to proof the tests that are presented to the users of Exercism.

She has also mentioned that it may be beneficial to be idiomatic, which is definitely possible over time.

It is not code that is gathered by the client, so it is not "front facing" code, though, of course, it is available for anyone to view if/when they come to the repository. I don't believe there is anything currently directing them to the example code at all, in the flow of the client and process of participating on the 'user' level.

It has been discussed that the tests should be as idiomatic as possible, as that is forward facing.

from crystal.

mhelmetag avatar mhelmetag commented on August 18, 2024

@kotp , I would agree that the examples should probably be the best they can be (like a gold standard) but... that will happen over time.

@asterite , your solution was awesome to see! Thanks for that!

from crystal.

elorest avatar elorest commented on August 18, 2024

@asterite I originally wrote this as a single method with if elsif but then changed it to be more dry. I had gotten feedback on previous solutions that they should have a lot more methods "like the ruby one", so I also broke it up into more methods. I agree that it probably wasn't necessary though.

One advantage to your solution is that it returns as soon as it's false and stops evaluating. :)

from crystal.

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.