Giter VIP home page Giter VIP logo

Comments (4)

KtorZ avatar KtorZ commented on August 17, 2024

Void it is.

See: https://aiken-lang.org/language-tour/primitive-types#void

from aiken.

nazrhom avatar nazrhom commented on August 17, 2024

Thanks for the reply @KtorZ. However, I still don't understand why that should be called Void rather than Unit. I would expect those two types to have different semantics.
I think it could be beneficial to mention this explicitly in the docs you linked, maybe adding some examples around the semantics of matching against this type.

from aiken.

KtorZ avatar KtorZ commented on August 17, 2024

You're probably expecting Unit because you come from the Haskell world, I assume? If that's the case, then, well, we just have a different semantic than Haskell :).

We could potentially add a small note to the website documentation for the Haskellers, feel free to make a PR 👍

from aiken.

nazrhom avatar nazrhom commented on August 17, 2024

Yeah, you are right. But I would expect a lot aiken developer to come from a Haskell background as well :)

I did not know that other languages use the same convention (just found this https://en.wikipedia.org/wiki/Unit_type) thanks for pointing that out!

from aiken.

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.