‹ BackHN Continuity

Thread

Vinix – A modern operating system written in V

111 points · 92 comments · hggh

  1. novacrazy · · focus · HN ↗
    [flagged]
    1. EGreg · · focus · HN ↗
      I don't know.

      But I just released a language called U, and I was surprised to see this one.

      <a href="https:&#x2F;&#x2F;ulanguage.org" rel="nofollow">https:&#x2F;&#x2F;ulanguage.org

      1. cestith · · focus · HN ↗
        When compiling to C, does it use MISRA C or some other accepted standard for how to write secure and reliable C?
        1. EGreg · · focus · HN ↗
          Yes, C11

          But in terms of security and reliability, U&#x27;s linter and compiler enforces that.

          1. vrighter · · focus · HN ↗
            C11 is the c language version. misra C is a set of guidelines for robust code when lives are on the line.

            One rule is &quot;no malloc after initialization&quot;. so no, you probably aren&#x27;t. Nor should you be. misra is intended for the programmerc not the compiler

            1. cestith · · focus · HN ↗
              He&#x27;s emitting C as an intermediate form. I&#x27;m asking if the C that&#x27;s emitted is meeting MISRA or any other recognized standard for secure and robust C code.
              1. vrighter · · focus · HN ↗
                you can&#x27;t have a compiler automatically generate misra C. Because misra is a set of programmer discipline guidelines. How would you automatically convert a program that does dynamic allocation into one that preallocates all memory up front in the init phase?
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.