4
Comments
  • 3
    wtf:

    "You can consider it to be a superset of c which compiles to clean c."

    The example code showing main looks nothing like c.
  • 1
    @Demolishun but the name is swallow 😂😅
  • 5
    @johnmelodyme Its a bird. Any questions?
  • 3
    @Demolishun .... Nope 😅😂😅😂😅
  • 1
    @Demolishun it says that the syntax is like python
  • 1
    @electrineer I got the quote of the same page.
  • 2
    Just read a blog about this on dev.to today. See someone on the comment says that they wish that there is compiled Python than a compiled language with the Python-like syntax.
  • 0
    @inawhile that's a non-issue. If you look at Haskell, 0 is inferred to be a bunch of different things based on context. And in C++ "auto x = 0;" will generally infer to int, but can be different (also since there are a bunch of different 0s, like 0u, 0.0f, 0.0, and longer variants). Haskell type classes and C++ concepts are excellent ways to constrain the family of things inferred as long as they behave "similarly".

    Type inference and generics aren't all that interesting when dealing with basic plain old data stuff like ints and floats and so on, it really gets cool when you have complex code and generic algorithms. If you're working on close to hardware stuff you probably will never have a use for it, if you're working on large scale software it can be pretty useful. If you judge all programming by the standards of low-level/embedded "portable assembler" code you're going to end up spending a lot of time uselessly hating a lot of things. Inference is also useful for verification and when refactoring (does the compiler/verifier agree with what you've done? If not there just might be a bug).

    Of course C++ and Rust bring all this to low level code too, but it's still a lot less useful there than elsewhere. That said I've personally had great success with C++ and Rust programming low level stuff with advanced programming techniques like TMP and iterators which are enabled in large part by features like generics and type inference, but I use C when appropriate as well.
Add Comment