Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 1.41 KB

File metadata and controls

71 lines (49 loc) · 1.41 KB

CSCI - C Syntax, Completely Idiotic

A Rust macro collection designed to make your code idiotic instead of idiomatic using C-style variable and function declaration.

See Usage for an example.

Usage

Why? Well, if you really want to, just cargo add csci and use csci::prelude::*, then

void!{main() {
    footgun(65); 
}}

void!{footgun(int caliber) {
    std::hint::unreachable_unchecked(); // unsafe by default!
}}

If everything goes smooth, you'll get illegal hardware instruction (core dumped).

But don't.

If you stil want to, here's the type table:

    (void)   => { () };
    (byte)   => { i8 };
    (short)  => { i16 };
    (int)    => { i32 };
    (long)   => { i64 };
    (char)   => { u8 };
    (ushort) => { u16 };
    (uint)   => { u32 };
    (ulong)  => { u64 };
    (float)  => { f32 };
    (double) => { f64 };

FAQ

Did you just copy-paste the table from the code?

Yes.

How to pronounce csci?

See-skee. Don't ask.

But why?

A dialogue I had:

So my 20 line build.rs is unreadable?

Yes, it is, Rust in unreadable in general.

But the clunky 50 line cmakelists are fine?

They're evil but readable, yes.

But why do find Rust unreadable?

Languages with name: type syntax should kill themselves.

Ok, you're welcome!

Also, why not?

I found a bug...

Intended, skill issue.

License

WTFPL, obviously.