Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should look at the Construct library, which overloads the '/' operator as syntactic sugar to make s-expressions in it's DSL less paren-heavy. I'm not saying I agree, but it was wild when I first saw it.

    Struct(
        "foo" / byte,
        "bar" / Struct( 
            "spam" / int16ul, 
            "bacon" / int64sb, ), 
        "viking" / int32sl, )


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: